diff options
author | Jakob Unterwurzacher | 2021-09-07 18:11:11 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-09-07 18:15:04 +0200 |
commit | 85c2beccaf674c69b3e30b0d646f5c11d91ecb9b (patch) | |
tree | 6e3efb67d7461b7df3e332c1ebe83691958a2dba /internal/stupidgcm/gcm.go | |
parent | f47e287c202ba92e9b48e65bf95e0771c6c4997c (diff) |
stupidgcm: normalize constructor naming
New() -> NewAES256GCM()
Also add missing NewChacha20poly1305
constructor in without_openssl.go.
Diffstat (limited to 'internal/stupidgcm/gcm.go')
-rw-r--r-- | internal/stupidgcm/gcm.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/stupidgcm/gcm.go b/internal/stupidgcm/gcm.go index a9377b1..c38dd5f 100644 --- a/internal/stupidgcm/gcm.go +++ b/internal/stupidgcm/gcm.go @@ -23,10 +23,10 @@ type stupidGCM struct { stupidAEADCommon } -// New returns a new AES-GCM-256 cipher that satisfies the cipher.AEAD interface. +// NewAES256GCM returns a new AES-256-GCM cipher that satisfies the cipher.AEAD interface. // // Only 32-bytes keys and 16-byte IVs are supported. -func New(keyIn []byte, forceDecode bool) cipher.AEAD { +func NewAES256GCM(keyIn []byte, forceDecode bool) cipher.AEAD { if len(keyIn) != keyLen { log.Panicf("Only %d-byte keys are supported", keyLen) } |