Island: Fix KeyBasedEncryptor's encrypt function's logic

This commit is contained in:
Shreya Malviya 2022-07-15 11:20:16 +05:30
parent 637926ed09
commit f542c9d0a8
1 changed files with 1 additions and 1 deletions

View File

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