This commit is contained in:
Wade Simmons
2026-07-24 10:26:38 -04:00
parent 0e1f5342ac
commit 738b4fa044
2 changed files with 9 additions and 8 deletions
+1 -1
View File
@@ -168,12 +168,12 @@ func init() {
// reusePanics reports whether re-encrypting with an already-used counter panics,
// as GCMWithXORCounterNonce is expected to.
func reusePanics(c noise.Cipher) (panicked bool) {
c.Encrypt(nil, 2, nil, nil)
defer func() {
if recover() != nil {
panicked = true
}
}()
c.Encrypt(nil, 2, nil, nil)
c.Encrypt(nil, 2, nil, nil)
return false
}