X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Faes.py;h=5efd0f836bcf2375b065be008a36e5b8a54d2e69;hb=c24dfef63c55ef1a5424d11b485c3b76245448a4;hp=662d49011be5a64a5b981aeec22881f113c98532;hpb=2514d2635e0c8ff0fb72d00a093a849001df2bdd;p=youtube-dl diff --git a/youtube_dl/aes.py b/youtube_dl/aes.py index 662d49011..5efd0f836 100644 --- a/youtube_dl/aes.py +++ b/youtube_dl/aes.py @@ -1,3 +1,5 @@ +from __future__ import unicode_literals + __all__ = ['aes_encrypt', 'key_expansion', 'aes_ctr_decrypt', 'aes_cbc_decrypt', 'aes_decrypt_text'] import base64 @@ -87,7 +89,7 @@ def key_expansion(data): temp = sub_bytes(temp) data += xor(temp, data[-key_size_bytes: 4 - key_size_bytes]) - for _ in range(3 if key_size_bytes == 32 else 2 if key_size_bytes == 24 else 0): + for _ in range(3 if key_size_bytes == 32 else 2 if key_size_bytes == 24 else 0): temp = data[-4:] data += xor(temp, data[-key_size_bytes: 4 - key_size_bytes]) data = data[:expanded_key_size_bytes]