aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/aes.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-04-21 00:35:57 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-04-21 00:48:52 +0530
commit9b8ee23b99de91f9e463050baddfd76fa6580ad6 (patch)
tree4e161e06d5f3953b2a0e10b0e60e53cbf8b39ea3 /yt_dlp/aes.py
parent62f6f1cbf253240a026a70538b5b58945563fc90 (diff)
downloadhypervideo-pre-9b8ee23b99de91f9e463050baddfd76fa6580ad6.tar.lz
hypervideo-pre-9b8ee23b99de91f9e463050baddfd76fa6580ad6.tar.xz
hypervideo-pre-9b8ee23b99de91f9e463050baddfd76fa6580ad6.zip
[dependencies] Create module with all dependency imports
Diffstat (limited to 'yt_dlp/aes.py')
-rw-r--r--yt_dlp/aes.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/yt_dlp/aes.py b/yt_dlp/aes.py
index 603f3d187..ba3baf3de 100644
--- a/yt_dlp/aes.py
+++ b/yt_dlp/aes.py
@@ -1,16 +1,17 @@
from math import ceil
-from .compat import compat_b64decode, compat_ord, compat_pycrypto_AES
+from .compat import compat_b64decode, compat_ord
+from .dependencies import Cryptodome_AES
from .utils import bytes_to_intlist, intlist_to_bytes
-if compat_pycrypto_AES:
+if Cryptodome_AES:
def aes_cbc_decrypt_bytes(data, key, iv):
""" Decrypt bytes with AES-CBC using pycryptodome """
- return compat_pycrypto_AES.new(key, compat_pycrypto_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 compat_pycrypto_AES.new(key, compat_pycrypto_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):