UT: Modify test_key_based_encryptor so it doesn't rely on KeyBasedEncryptor._BLOCK_SIZE

This commit is contained in:
Shreya Malviya 2022-07-15 12:15:11 +05:30
parent 24a119eb81
commit ca420b8afc
1 changed files with 2 additions and 1 deletions

View File

@ -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