diff options
| author | 2025-07-31 01:22:01 -0400 | |
|---|---|---|
| committer | 2025-07-31 01:22:01 -0400 | |
| commit | a6e995c093de8aae2e91a0787281bb34c0b871eb (patch) | |
| tree | 2d79821b05300d34d8871eb6c9662b359a2de85d /gallery_dl/aes.py | |
| parent | 7672a750cb74bf31e21d76aad2776367fd476155 (diff) | |
New upstream version 1.30.2.upstream/1.30.2
Diffstat (limited to 'gallery_dl/aes.py')
| -rw-r--r-- | gallery_dl/aes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gallery_dl/aes.py b/gallery_dl/aes.py index 3fd1d5e..c671de9 100644 --- a/gallery_dl/aes.py +++ b/gallery_dl/aes.py @@ -58,7 +58,7 @@ bytes_to_intlist = list def intlist_to_bytes(xs): if not xs: return b"" - return struct.pack("%dB" % len(xs), *xs) + return struct.pack(f"{len(xs)}B", *xs) def unpad_pkcs7(data): @@ -615,7 +615,7 @@ def block_product(block_x, block_y): if len(block_x) != BLOCK_SIZE_BYTES or len(block_y) != BLOCK_SIZE_BYTES: raise ValueError( - "Length of blocks need to be %d bytes" % BLOCK_SIZE_BYTES) + f"Length of blocks need to be {BLOCK_SIZE_BYTES} bytes") block_r = [0xE1] + [0] * (BLOCK_SIZE_BYTES - 1) block_v = block_y[:] @@ -639,7 +639,7 @@ def ghash(subkey, data): if len(data) % BLOCK_SIZE_BYTES: raise ValueError( - "Length of data should be %d bytes" % BLOCK_SIZE_BYTES) + f"Length of data should be {BLOCK_SIZE_BYTES} bytes") last_y = [0] * BLOCK_SIZE_BYTES for i in range(0, len(data), BLOCK_SIZE_BYTES): |
