diff options
author | Sergey M․ <dstftw@gmail.com> | 2018-01-23 22:23:12 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2018-01-23 22:23:12 +0700 |
commit | cf2820710d61742818a906af07f6d6c9669d58a9 (patch) | |
tree | 49da7e89124bcbfd9d297906d8436ff1cd107820 /youtube_dl/aes.py | |
parent | 5d7d805ca90992cac1cdffbe5d3df3d894d2b979 (diff) |
Switch codebase to use compat_b64decode
Diffstat (limited to 'youtube_dl/aes.py')
-rw-r--r-- | youtube_dl/aes.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/aes.py b/youtube_dl/aes.py index c5bb3c4ef..461bb6d41 100644 --- a/youtube_dl/aes.py +++ b/youtube_dl/aes.py @@ -1,8 +1,8 @@ from __future__ import unicode_literals -import base64 from math import ceil +from .compat import compat_b64decode from .utils import bytes_to_intlist, intlist_to_bytes BLOCK_SIZE_BYTES = 16 @@ -180,7 +180,7 @@ def aes_decrypt_text(data, password, key_size_bytes): """ NONCE_LENGTH_BYTES = 8 - data = bytes_to_intlist(base64.b64decode(data.encode('utf-8'))) + data = bytes_to_intlist(compat_b64decode(data)) password = bytes_to_intlist(password.encode('utf-8')) key = password[:key_size_bytes] + [0] * (key_size_bytes - len(password)) |