From ca420b8afca0edcc8d80ce3aba63abd3aeaa221b Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Fri, 15 Jul 2022 12:15:11 +0530 Subject: [PATCH] UT: Modify test_key_based_encryptor so it doesn't rely on KeyBasedEncryptor._BLOCK_SIZE --- .../cc/server_utils/encryption/test_key_based_encryptor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monkey/tests/unit_tests/monkey_island/cc/server_utils/encryption/test_key_based_encryptor.py b/monkey/tests/unit_tests/monkey_island/cc/server_utils/encryption/test_key_based_encryptor.py index 41e639475..14ab104ba 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/server_utils/encryption/test_key_based_encryptor.py +++ b/monkey/tests/unit_tests/monkey_island/cc/server_utils/encryption/test_key_based_encryptor.py @@ -3,7 +3,8 @@ import pytest from monkey_island.cc.server_utils.encryption import KeyBasedEncryptor PLAINTEXT = "password" -PLAINTEXT_MULTIPLE_BLOCK_SIZE = "banana" * KeyBasedEncryptor._BLOCK_SIZE +# cryptography.fernet.Fernet.generate_key() generates a 32-bit key +PLAINTEXT_MULTIPLE_BLOCK_SIZE = "banana" * 32 PLAINTEXT_UTF8_1 = "slaptažodis" # "password" in Lithuanian PLAINTEXT_UTF8_2 = "弟" # Japanese PLAINTEXT_UTF8_3 = "ж" # Ukranian