We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ad3749 commit 5a90c26Copy full SHA for 5a90c26
tibudecrypt.py
@@ -62,7 +62,8 @@ def pkcs5_unpad(chunk):
62
63
# Cite https://stackoverflow.com/a/20457519
64
if padding_length < 1 or padding_length > Crypto.Cipher.AES.block_size:
65
- raise ValueError("bad decrypt pad (%d)" % padding_length)
+ raise ValueError("bad decrypt pad ({padding_length:d})".format(
66
+ padding_length=padding_length))
67
68
# all the pad-bytes must be the same
69
expected_bytes = chr(padding_length).encode('ascii') * padding_length
0 commit comments