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:
|
except ValueError as ex:
|
||||||
if str(ex).startswith("Wrong password"):
|
if str(ex).startswith("Wrong password"):
|
||||||
logger.info("Wrong password provided for decryption.")
|
logger.error("Wrong password provided for decryption.")
|
||||||
raise InvalidCredentialsError
|
raise InvalidCredentialsError
|
||||||
else:
|
else:
|
||||||
logger.info("The corrupt ciphertext provided.")
|
logger.error("The provided ciphertext was corrupt.")
|
||||||
raise InvalidCiphertextError
|
raise InvalidCiphertextError
|
||||||
return plaintext_stream.getvalue()
|
return plaintext_stream.getvalue()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue