about summary refs log tree commit diff
diff options
context:
space:
mode:
authorrzhxeo <rzhxeo@users.noreply.github.com>2013-08-28 16:03:35 +0200
committerrzhxeo <rzhxeo@users.noreply.github.com>2013-08-28 16:03:35 +0200
commit0012690aae977d76e9162e2334989498366a8e94 (patch)
treefba261bf195b01489a7d99627a001b4e7351681e
parent6e74bc41ca07bda56107cfff9ceb98d6f8d28e53 (diff)
downloadyoutube-dl-0012690aae977d76e9162e2334989498366a8e94.tar.gz
youtube-dl-0012690aae977d76e9162e2334989498366a8e94.tar.xz
youtube-dl-0012690aae977d76e9162e2334989498366a8e94.zip
Let aes_decrypt_text return bytes instead of unicode
-rw-r--r--youtube_dl/aes.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/youtube_dl/aes.py b/youtube_dl/aes.py
index 9913d59a4..9a0c93fa6 100644
--- a/youtube_dl/aes.py
+++ b/youtube_dl/aes.py
@@ -3,7 +3,7 @@ __all__ = ['aes_encrypt', 'key_expansion', 'aes_ctr_decrypt', 'aes_decrypt_text'
 import base64
 from math import ceil
 
-from .utils import bytes_to_intlist
+from .utils import bytes_to_intlist, intlist_to_bytes
 
 BLOCK_SIZE_BYTES = 16
 
@@ -118,7 +118,7 @@ def aes_decrypt_text(data, password, key_size_bytes):
             return temp
     
     decrypted_data = aes_ctr_decrypt(cipher, key, Counter())
-    plaintext = ''.join(map(lambda x: chr(x), decrypted_data))
+    plaintext = intlist_to_bytes(decrypted_data)
     
     return plaintext