Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Commit e125fb1

Browse files
committed
fix: use HASH_SIZE instead of hard coding it
1 parent 30092bc commit e125fb1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_crypto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def test_kem_otp_encryption():
153153

154154
# Tampering test: flip a byte
155155
tampered_message = bytearray(encrypted)
156-
tampered_message[65] ^= 0xFF
156+
tampered_message[HASH_SIZE + 1] ^= 0xFF
157157

158158
tampered_decrypted = otp_decrypt_with_padding(bytes(tampered_message), plaintext[:len(encrypted)])
159159
tampered_hash = tampered_decrypted[:HASH_SIZE]

0 commit comments

Comments
 (0)