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:
2025-11-07 07:38:18 +00:00
parent 2e460b5796
commit cca78f4224
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)