aboutsummaryrefslogtreecommitdiff
path: root/internal/stupidgcm/xchacha.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/xchacha.go
parentf47e287c202ba92e9b48e65bf95e0771c6c4997c (diff)
stupidgcm: normalize constructor naming
New() -> NewAES256GCM() Also add missing NewChacha20poly1305 constructor in without_openssl.go.
Diffstat (limited to 'internal/stupidgcm/xchacha.go')
-rw-r--r--internal/stupidgcm/xchacha.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/stupidgcm/xchacha.go b/internal/stupidgcm/xchacha.go
index deb6e2f..ca740e4 100644
--- a/internal/stupidgcm/xchacha.go
+++ b/internal/stupidgcm/xchacha.go
@@ -70,7 +70,7 @@ func (x *stupidXchacha20poly1305) Seal(dst, nonce, plaintext, additionalData []b
}
hKey, _ := chacha20.HChaCha20(x.key[:], nonce[0:16])
- c := NewChacha20poly1305(hKey)
+ c := NewChacha20poly1305(hKey).(*stupidChacha20poly1305)
defer c.Wipe()
// The first 4 bytes of the final nonce are unused counter space.
@@ -95,7 +95,7 @@ func (x *stupidXchacha20poly1305) Open(dst, nonce, ciphertext, additionalData []
}
hKey, _ := chacha20.HChaCha20(x.key[:], nonce[0:16])
- c := NewChacha20poly1305(hKey)
+ c := NewChacha20poly1305(hKey).(*stupidChacha20poly1305)
defer c.Wipe()
// The first 4 bytes of the final nonce are unused counter space.