Island: Fix KeyBasedEncryptor's encrypt function's logic
This commit is contained in:
parent
637926ed09
commit
f542c9d0a8
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue