diff options
-rw-r--r-- | internal/stupidgcm/common_test.go | 2 | ||||
-rw-r--r-- | internal/stupidgcm/gcm.go | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/internal/stupidgcm/common_test.go b/internal/stupidgcm/common_test.go index 10a7ce1..1b32cfa 100644 --- a/internal/stupidgcm/common_test.go +++ b/internal/stupidgcm/common_test.go @@ -215,7 +215,7 @@ func testOpenAllZero(t *testing.T, c cipher.AEAD) { func testWipe(t *testing.T, c cipher.AEAD) { switch c2 := c.(type) { - case *StupidGCM: + case *stupidGCM: c2.Wipe() if !c2.Wiped() { t.Error("c2.wiped is not set") diff --git a/internal/stupidgcm/gcm.go b/internal/stupidgcm/gcm.go index 439e7a7..0cadd3c 100644 --- a/internal/stupidgcm/gcm.go +++ b/internal/stupidgcm/gcm.go @@ -21,20 +21,19 @@ const ( tagLen = 16 ) -// StupidGCM implements the cipher.AEAD interface -type StupidGCM struct { +type stupidGCM struct { stupidAEADCommon } // Verify that we satisfy the interface -var _ cipher.AEAD = &StupidGCM{} +var _ cipher.AEAD = &stupidGCM{} // New returns a new cipher.AEAD implementation.. func New(keyIn []byte, forceDecode bool) cipher.AEAD { if len(keyIn) != keyLen { log.Panicf("Only %d-byte keys are supported", keyLen) } - return &StupidGCM{ + return &stupidGCM{ stupidAEADCommon{ // Create a private copy of the key key: append([]byte{}, keyIn...), |