Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
colinxu2020 committed Jul 16, 2024
1 parent ae8a40a commit 6c88406
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_a.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,14 @@ def judge(para):
with raises(SLHDSAKeyException):
PublicKey.from_digest(pk, para)
sk = KeyPair.gen(para).sec.digest()
newchar = chr((ord(sk[-1].decode())+1)%256).encode()
newchar = chr((sk[-1]+1)%256).encode()
sk = sk[:-1]
with raises(SLHDSAKeyException):
SecretKey.from_digest(sk, para)
with raises(SLHDSAKeyException):
SecretKey.from_digest(sk+newchar, para)
kp = KeyPair.gen(para).digest()
newchar = chr((ord(kp[-1].decode())+1)%256).encode()
newchar = chr((kp[-1]+1)%256).encode()
kp = kp[:-1]
with raises(SLHDSAKeyException):
KeyPair.from_digest(kp, para)
Expand Down

0 comments on commit 6c88406

Please sign in to comment.