projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6e74bc4
)
Let aes_decrypt_text return bytes instead of unicode
author
rzhxeo
<rzhxeo@users.noreply.github.com>
Wed, 28 Aug 2013 14:03:35 +0000
(16:03 +0200)
committer
rzhxeo
<rzhxeo@users.noreply.github.com>
Wed, 28 Aug 2013 14:03:35 +0000
(16:03 +0200)
youtube_dl/aes.py
patch
|
blob
|
history
diff --git
a/youtube_dl/aes.py
b/youtube_dl/aes.py
index 9913d59a4e014189d21a5d75da32b70badac39c6..9a0c93fa6f4efb415f7e6dad25239a4c219a2542 100644
(file)
--- 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