forked from p15670423/monkey
Island: Improve logging in PasswordBasedBytesEncryptor
This commit is contained in:
parent
5aa0506ce1
commit
a24979155f
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue