API cleanup for simplified update/final. Returns bytearrays when into is not used. Allows into buffers larger than needed. Misc other changes.

This commit is contained in:
LeoVasanko committed 2025-11-07 07:38:18 +00:00
1 parent 2e460b5796
commit cca78f4224
10 files changed
+1277 -1254

No files matched your search

+2 -4
View File
@@ -174,8 +174,7 @@ def test_encrypt_decrypt_incremental(vector):
pt_chunks = []
for chunk in random_split_bytes(computed_ct):
pt_chunks.append(bytes(decryptor.update(chunk)))
final_pt = decryptor.final(expected_tag128)
pt_chunks.append(bytes(final_pt))
decryptor.final(expected_tag128)
# Combine plaintext chunks
computed_pt = b"".join(pt_chunks)
@@ -215,8 +214,7 @@ def test_encrypt_decrypt_incremental(vector):
pt_chunks = []
for chunk in random_split_bytes(computed_ct):
pt_chunks.append(bytes(decryptor.update(chunk)))
final_pt = decryptor.final(expected_tag256)
pt_chunks.append(bytes(final_pt))
decryptor.final(expected_tag256)
# Combine plaintext chunks
computed_pt = b"".join(pt_chunks)