From 7153b91c108ba828df39fce19d104c7b93388337 Mon Sep 17 00:00:00 2001 From: Shreya Date: Tue, 1 Jun 2021 15:51:31 +0530 Subject: [PATCH] Use buffer size directly from pyAesCrypt --- monkey/monkey_island/cc/services/utils/config_encryption.py | 3 +-- test_config_encryption.py | 0 2 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 test_config_encryption.py diff --git a/monkey/monkey_island/cc/services/utils/config_encryption.py b/monkey/monkey_island/cc/services/utils/config_encryption.py index 35b580b78..eb597be7c 100644 --- a/monkey/monkey_island/cc/services/utils/config_encryption.py +++ b/monkey/monkey_island/cc/services/utils/config_encryption.py @@ -6,8 +6,7 @@ import pyAesCrypt from common.utils.exceptions import FailedDecryption, NoCredentialsError -# TODO use from pyAesCrypt -BUFFER_SIZE = 64 * 1024 +BUFFER_SIZE = pyAesCrypt.crypto.bufferSizeDef def encrypt_config(config: Dict, password: str) -> str: diff --git a/test_config_encryption.py b/test_config_encryption.py new file mode 100644 index 000000000..e69de29bb