summaryrefslogtreecommitdiffstats
path: root/gallery_dl/aes.py
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@unit193.net>2025-03-29 07:19:58 -0400
committerLibravatarUnit 193 <unit193@unit193.net>2025-03-29 07:19:58 -0400
commit662e5ac868a5c1a3e7bc95b37054b3a0ca4db74f (patch)
tree537d0429926fb5eb3719aa2b384048ae79bda0b8 /gallery_dl/aes.py
parent8026a3c45446030d7af524bfc487d3462c8114ef (diff)
New upstream version 1.29.3.upstream/1.29.3
Diffstat (limited to 'gallery_dl/aes.py')
-rw-r--r--gallery_dl/aes.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/gallery_dl/aes.py b/gallery_dl/aes.py
index 6727541..3fd1d5e 100644
--- a/gallery_dl/aes.py
+++ b/gallery_dl/aes.py
@@ -78,7 +78,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):
@@ -99,7 +99,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):
@@ -132,7 +132,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
@@ -184,7 +184,7 @@ def aes_cbc_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)
encrypted_data = []
previous_cipher_block = iv