Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
radumarias committed Aug 14, 2024
1 parent 099ddec commit 479b2e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion benches/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def decrypt_from(block_len):
for i in range(3):
cipher.copy_slice(plaintext, buf[:plaintext_len])
ciphertext_len = cipher.seal_in_place(buf, plaintext_len, i, aad)
ciphertext = buf[:ciphertext_len]
ciphertext = bytes(buf[:ciphertext_len])

a = datetime.datetime.now()

Expand Down
4 changes: 2 additions & 2 deletions tests/test_rencrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ def seal_and_open_in_place_from(this, cipher_meta):

# encrypt it, after this will have the ciphertext in the buffer
ciphertext_len = cipher.seal_in_place_from(plaintext, buf, 42, aad)
cipertext = bytes(buf[:ciphertext_len])
ciphertext = bytes(buf[:ciphertext_len])

# decrypt it
plaintext_len = cipher.open_in_place_from(cipertext, buf, 42, aad)
plaintext_len = cipher.open_in_place_from(ciphertext, buf, 42, aad)
plaintext2 = buf[:plaintext_len]
this.assertEqual(plaintext, plaintext2)

Expand Down

0 comments on commit 479b2e8

Please sign in to comment.