Island: Improve logging in PasswordBasedBytesEncryptor

This commit is contained in:
Mike Salvatore 2021-10-04 17:21:08 -04:00
parent 5aa0506ce1
commit a24979155f
1 changed files with 2 additions and 2 deletions

View File

@ -47,10 +47,10 @@ class PasswordBasedBytesEncryptor(IEncryptor):
)
except ValueError as ex:
if str(ex).startswith("Wrong password"):
logger.info("Wrong password provided for decryption.")
logger.error("Wrong password provided for decryption.")
raise InvalidCredentialsError
else:
logger.info("The corrupt ciphertext provided.")
logger.error("The provided ciphertext was corrupt.")
raise InvalidCiphertextError
return plaintext_stream.getvalue()