MCPcopy
hub / github.com/pyca/cryptography / test_update_auto_chunking

Function test_update_auto_chunking

tests/hazmat/primitives/test_ciphers.py:258–270  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

256 sys.platform not in {"linux", "darwin"}, reason="mmap required"
257)
258def test_update_auto_chunking():
259 large_data = large_mmap(length=2**29 + 2**20)
260
261 key = b"\x00" * 16
262 c = ciphers.Cipher(AES(key), modes.ECB())
263 encryptor = c.encryptor()
264
265 result = encryptor.update(memoryview(large_data))
266 assert len(result) == len(large_data)
267
268 decryptor = c.decryptor()
269 result = decryptor.update(result)
270 assert result == large_data[:]

Callers

nothing calls this directly

Calls 5

encryptorMethod · 0.95
decryptorMethod · 0.95
AESClass · 0.90
large_mmapFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected