async-mega-py 2.1.0__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/PKG-INFO +1 -1
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/pyproject.toml +1 -1
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/chunker.py +6 -2
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/LICENSE +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/README.md +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/__init__.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/__main__.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/api.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/auth.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/client.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/core.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/crypto.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/data_structures.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/download.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/env.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/errors.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/filesystem.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/progress/__init__.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/progress/rich_progress.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/py.typed +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/transfer_it.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/upload.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/utils.py +0 -0
- {async_mega_py-2.1.0 → async_mega_py-2.1.1}/src/mega/vault.py +0 -0
|
@@ -90,11 +90,13 @@ def _iter_chunks(
|
|
|
90
90
|
|
|
91
91
|
aes = AES.new(key_bytes, AES.MODE_CTR, counter=Counter.new(128, initial_value=nonce))
|
|
92
92
|
mac_cypher = AES.new(key_bytes, AES.MODE_CBC, EMPTY_IV)
|
|
93
|
-
chunk_cypher = AES.new(key_bytes, AES.MODE_CBC, iv_bytes)
|
|
94
|
-
|
|
95
93
|
data_in: bytes | None = yield b""
|
|
96
94
|
|
|
97
95
|
while data_in is not None:
|
|
96
|
+
if not data_in:
|
|
97
|
+
data_in = yield b""
|
|
98
|
+
continue
|
|
99
|
+
|
|
98
100
|
if decrypt:
|
|
99
101
|
decrypted_data = data_out = aes.decrypt(data_in)
|
|
100
102
|
else:
|
|
@@ -104,6 +106,8 @@ def _iter_chunks(
|
|
|
104
106
|
mem_view = memoryview(decrypted_data)
|
|
105
107
|
last_block_index = (len(decrypted_data) % AES.block_size) or AES.block_size
|
|
106
108
|
last_block = pad_bytes(mem_view[-last_block_index:])
|
|
109
|
+
|
|
110
|
+
chunk_cypher = AES.new(key_bytes, AES.MODE_CBC, iv_bytes)
|
|
107
111
|
chunk_cypher.encrypt(mem_view[:-last_block_index])
|
|
108
112
|
mac_bytes = mac_cypher.encrypt(chunk_cypher.encrypt(last_block))
|
|
109
113
|
data_in = yield data_out
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|