diff options
author | Simon Sawicki <contact@grub4k.xyz> | 2025-03-22 00:41:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-21 23:41:56 +0000 |
commit | f36e4b6e65cb8403791aae2f520697115cb88dec (patch) | |
tree | c161d5f0a52648e0abca699a02cb9d6897deff45 /yt_dlp/aes.py | |
parent | 983095485c731240aae27c950cb8c24a50827b56 (diff) |
[cleanup] Misc (#12526)
Authored by: Grub4K, seproDev, gamer191, dirkf
Co-authored-by: sepro <sepro@sepr0.com>
Diffstat (limited to 'yt_dlp/aes.py')
-rw-r--r-- | yt_dlp/aes.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/yt_dlp/aes.py b/yt_dlp/aes.py index 9908434a5..065901d68 100644 --- a/yt_dlp/aes.py +++ b/yt_dlp/aes.py @@ -83,7 +83,7 @@ def aes_ecb_encrypt(data, key, iv=None): @returns {int[]} encrypted data """ expanded_key = key_expansion(key) - block_count = int(ceil(float(len(data)) / BLOCK_SIZE_BYTES)) + block_count = ceil(len(data) / BLOCK_SIZE_BYTES) encrypted_data = [] for i in range(block_count): @@ -103,7 +103,7 @@ def aes_ecb_decrypt(data, key, iv=None): @returns {int[]} decrypted data """ expanded_key = key_expansion(key) - block_count = int(ceil(float(len(data)) / BLOCK_SIZE_BYTES)) + block_count = ceil(len(data) / BLOCK_SIZE_BYTES) encrypted_data = [] for i in range(block_count): @@ -134,7 +134,7 @@ def aes_ctr_encrypt(data, key, iv): @returns {int[]} encrypted data """ expanded_key = key_expansion(key) - block_count = int(ceil(float(len(data)) / BLOCK_SIZE_BYTES)) + block_count = ceil(len(data) / BLOCK_SIZE_BYTES) counter = iter_vector(iv) encrypted_data = [] @@ -158,7 +158,7 @@ def aes_cbc_decrypt(data, key, iv): @returns {int[]} decrypted data """ expanded_key = key_expansion(key) - block_count = int(ceil(float(len(data)) / BLOCK_SIZE_BYTES)) + block_count = ceil(len(data) / BLOCK_SIZE_BYTES) decrypted_data = [] previous_cipher_block = iv @@ -183,7 +183,7 @@ def aes_cbc_encrypt(data, key, iv, *, padding_mode='pkcs7'): @returns {int[]} encrypted data """ expanded_key = key_expansion(key) - block_count = int(ceil(float(len(data)) / BLOCK_SIZE_BYTES)) + block_count = ceil(len(data) / BLOCK_SIZE_BYTES) encrypted_data = [] previous_cipher_block = iv |