mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-27 07:23:25 +00:00
backport padding fix to AES module
This commit is contained in:
parent
27382c210e
commit
059d381ba8
1 changed files with 2 additions and 0 deletions
|
@ -51,6 +51,8 @@ def strip_PKCS7_padding(s):
|
||||||
raise ValueError("Invalid PKCS7 padding")
|
raise ValueError("Invalid PKCS7 padding")
|
||||||
return s[:-numpads]
|
return s[:-numpads]
|
||||||
|
|
||||||
|
# backport padding fix to AES module
|
||||||
|
aes.strip_PKCS7_padding = strip_PKCS7_padding
|
||||||
|
|
||||||
def aes_encrypt_with_iv(key, iv, data):
|
def aes_encrypt_with_iv(key, iv, data):
|
||||||
mode = aes.AESModeOfOperation.modeOfOperation["CBC"]
|
mode = aes.AESModeOfOperation.modeOfOperation["CBC"]
|
||||||
|
|
Loading…
Add table
Reference in a new issue