aboutsummaryrefslogtreecommitdiff
path: root/internal/stupidgcm/common_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/stupidgcm/common_test.go')
-rw-r--r--internal/stupidgcm/common_test.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/internal/stupidgcm/common_test.go b/internal/stupidgcm/common_test.go
index cf555b0..8123ce2 100644
--- a/internal/stupidgcm/common_test.go
+++ b/internal/stupidgcm/common_test.go
@@ -183,8 +183,18 @@ func testWipe(t *testing.T, c cipher.AEAD) {
t.Fatal("c2.key is not zeroed")
}
}
+ case *stupidXchacha20poly1305:
+ c2.Wipe()
+ if !c2.wiped {
+ t.Error("c2.wiped is not set")
+ }
+ for _, v := range c2.key {
+ if v != 0 {
+ t.Fatal("c2.key is not zeroed")
+ }
+ }
default:
- t.Fatalf("BUG: unhandled type %t", c2)
+ t.Fatalf("BUG: unhandled type %T", c2)
}
}