mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-30 12:01:28 +00:00
Revert "[fragments] Pad fragments before decrypting (#1298)"
This reverts commit 373475f035
.
This commit is contained in:
parent
aa7785f860
commit
2cda6b401d
|
@ -355,8 +355,7 @@ def decrypt_fragment(fragment, frag_content):
|
||||||
# not what it decrypts to.
|
# not what it decrypts to.
|
||||||
if self.params.get('test', False):
|
if self.params.get('test', False):
|
||||||
return frag_content
|
return frag_content
|
||||||
padding_len = 16 - (len(frag_content) % 16)
|
decrypted_data = aes_cbc_decrypt_bytes(frag_content, decrypt_info['KEY'], iv)
|
||||||
decrypted_data = aes_cbc_decrypt_bytes(frag_content + bytes([padding_len] * padding_len), decrypt_info['KEY'], iv)
|
|
||||||
return decrypted_data[:-decrypted_data[-1]]
|
return decrypted_data[:-decrypted_data[-1]]
|
||||||
|
|
||||||
return decrypt_fragment
|
return decrypt_fragment
|
||||||
|
|
Loading…
Reference in a new issue