diff options
author | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-21 00:35:57 +0530 |
---|---|---|
committer | pukkandan <pukkandan.ytdlp@gmail.com> | 2022-04-21 00:48:52 +0530 |
commit | 9b8ee23b99de91f9e463050baddfd76fa6580ad6 (patch) | |
tree | 4e161e06d5f3953b2a0e10b0e60e53cbf8b39ea3 /test/test_aes.py | |
parent | 62f6f1cbf253240a026a70538b5b58945563fc90 (diff) | |
download | hypervideo-pre-9b8ee23b99de91f9e463050baddfd76fa6580ad6.tar.lz hypervideo-pre-9b8ee23b99de91f9e463050baddfd76fa6580ad6.tar.xz hypervideo-pre-9b8ee23b99de91f9e463050baddfd76fa6580ad6.zip |
[dependencies] Create module with all dependency imports
Diffstat (limited to 'test/test_aes.py')
-rw-r--r-- | test/test_aes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test_aes.py b/test/test_aes.py index 1c1238c8b..c934104e3 100644 --- a/test/test_aes.py +++ b/test/test_aes.py @@ -23,7 +23,7 @@ from yt_dlp.aes import ( aes_gcm_decrypt_and_verify, aes_gcm_decrypt_and_verify_bytes, ) -from yt_dlp.compat import compat_pycrypto_AES +from yt_dlp.dependencies import Cryptodome_AES from yt_dlp.utils import bytes_to_intlist, intlist_to_bytes # the encrypted data can be generate with 'devscripts/generate_aes_testdata.py' @@ -45,7 +45,7 @@ class TestAES(unittest.TestCase): data = b'\x97\x92+\xe5\x0b\xc3\x18\x91ky9m&\xb3\xb5@\xe6\x27\xc2\x96.\xc8u\x88\xab9-[\x9e|\xf1\xcd' decrypted = intlist_to_bytes(aes_cbc_decrypt(bytes_to_intlist(data), self.key, self.iv)) self.assertEqual(decrypted.rstrip(b'\x08'), self.secret_msg) - if compat_pycrypto_AES: + if Cryptodome_AES: decrypted = aes_cbc_decrypt_bytes(data, intlist_to_bytes(self.key), intlist_to_bytes(self.iv)) self.assertEqual(decrypted.rstrip(b'\x08'), self.secret_msg) @@ -75,7 +75,7 @@ class TestAES(unittest.TestCase): decrypted = intlist_to_bytes(aes_gcm_decrypt_and_verify( bytes_to_intlist(data), self.key, bytes_to_intlist(authentication_tag), self.iv[:12])) self.assertEqual(decrypted.rstrip(b'\x08'), self.secret_msg) - if compat_pycrypto_AES: + if Cryptodome_AES: decrypted = aes_gcm_decrypt_and_verify_bytes( data, intlist_to_bytes(self.key), authentication_tag, intlist_to_bytes(self.iv[:12])) self.assertEqual(decrypted.rstrip(b'\x08'), self.secret_msg) |