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:
Leo Vasanko
2025-11-06 19:38:18 -06:00
parent 46dff56e28
commit 7175654b27
10 changed files with 1277 additions and 1254 deletions
+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)