From f542c9d0a89571fc65870fd2c2cf31be56958a65 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Fri, 15 Jul 2022 11:20:16 +0530 Subject: [PATCH] Island: Fix KeyBasedEncryptor's encrypt function's logic --- .../cc/server_utils/encryption/key_based_encryptor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)