diff --git a/monkey/monkey_island/cc/server_utils/encryption/key_based_encryptor.py b/monkey/monkey_island/cc/server_utils/encryption/key_based_encryptor.py index 9e53e16a6..4b6bf8fb2 100644 --- a/monkey/monkey_island/cc/server_utils/encryption/key_based_encryptor.py +++ b/monkey/monkey_island/cc/server_utils/encryption/key_based_encryptor.py @@ -24,7 +24,7 @@ class KeyBasedEncryptor(IEncryptor): self._fernet_object = Fernet(self._key) def encrypt(self, plaintext: bytes) -> bytes: - return self._fernet_object.encrypt(plaintext.encode()) + return self._fernet_object.encrypt(plaintext) def decrypt(self, ciphertext: bytes) -> bytes: return self._fernet_object.decrypt(ciphertext)