aboutsummaryrefslogtreecommitdiffstats
path: root/hypervideo_dl/aes.py
diff options
context:
space:
mode:
authorJesus <heckyel@riseup.net>2023-09-04 01:59:36 +0800
committerJesus <heckyel@riseup.net>2023-09-04 01:59:36 +0800
commitb3013540b41d1eb77c4803c5fca46f8d75b40fc1 (patch)
tree97735cb0c49f3a2b0f276e1cd90817833d590d69 /hypervideo_dl/aes.py
parenteaeeef9c1d1bedb76fea953c332ef84d53bffe2c (diff)
downloadhypervideo-b3013540b41d1eb77c4803c5fca46f8d75b40fc1.tar.lz
hypervideo-b3013540b41d1eb77c4803c5fca46f8d75b40fc1.tar.xz
hypervideo-b3013540b41d1eb77c4803c5fca46f8d75b40fc1.zip
update from upstream
Diffstat (limited to 'hypervideo_dl/aes.py')
-rw-r--r--hypervideo_dl/aes.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/hypervideo_dl/aes.py b/hypervideo_dl/aes.py
index 60ce99c..b3a383c 100644
--- a/hypervideo_dl/aes.py
+++ b/hypervideo_dl/aes.py
@@ -2,17 +2,17 @@ import base64
from math import ceil
from .compat import compat_ord
-from .dependencies import Cryptodome_AES
+from .dependencies import Cryptodome
from .utils import bytes_to_intlist, intlist_to_bytes
-if Cryptodome_AES:
+if Cryptodome.AES:
def aes_cbc_decrypt_bytes(data, key, iv):
""" Decrypt bytes with AES-CBC using pycryptodome """
- return Cryptodome_AES.new(key, Cryptodome_AES.MODE_CBC, iv).decrypt(data)
+ return Cryptodome.AES.new(key, Cryptodome.AES.MODE_CBC, iv).decrypt(data)
def aes_gcm_decrypt_and_verify_bytes(data, key, tag, nonce):
""" Decrypt bytes with AES-GCM using pycryptodome """
- return Cryptodome_AES.new(key, Cryptodome_AES.MODE_GCM, nonce).decrypt_and_verify(data, tag)
+ return Cryptodome.AES.new(key, Cryptodome.AES.MODE_GCM, nonce).decrypt_and_verify(data, tag)
else:
def aes_cbc_decrypt_bytes(data, key, iv):