aboutsummaryrefslogtreecommitdiff
path: root/internal/stupidgcm/chacha.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-09-07 18:11:11 +0200
committerJakob Unterwurzacher2021-09-07 18:15:04 +0200
commit85c2beccaf674c69b3e30b0d646f5c11d91ecb9b (patch)
tree6e3efb67d7461b7df3e332c1ebe83691958a2dba /internal/stupidgcm/chacha.go
parentf47e287c202ba92e9b48e65bf95e0771c6c4997c (diff)
stupidgcm: normalize constructor naming
New() -> NewAES256GCM() Also add missing NewChacha20poly1305 constructor in without_openssl.go.
Diffstat (limited to 'internal/stupidgcm/chacha.go')
-rw-r--r--internal/stupidgcm/chacha.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/stupidgcm/chacha.go b/internal/stupidgcm/chacha.go
index 1117d97..e09ed0b 100644
--- a/internal/stupidgcm/chacha.go
+++ b/internal/stupidgcm/chacha.go
@@ -37,7 +37,7 @@ func init() {
// block by XChaCha20-Poly1305.
//
// Only 32-bytes keys and 12-byte IVs are supported.
-func NewChacha20poly1305(key []byte) *stupidChacha20poly1305 {
+func NewChacha20poly1305(key []byte) cipher.AEAD {
if len(key) != chacha20poly1305.KeySize {
log.Panicf("Only %d-byte keys are supported, you passed %d bytes", chacha20poly1305.KeySize, len(key))
}