internal/aead : replace miscreant with xchacha20poly1305

This commit is contained in:
Bobby DeSimone 2019-01-16 12:36:59 -08:00
parent 72922b8ee8
commit 8d84391340
No known key found for this signature in database
GPG key ID: AEE4CF12FE86D07E

View file

@ -62,7 +62,7 @@ func GenerateNonce() []byte {
return nonce
}
// Encrypt a value using AES-CMAC-SIV
// Encrypt a value using XChaCha20-Poly1305
func (c *XChaCha20Cipher) Encrypt(plaintext []byte) (joined []byte, err error) {
c.mu.Lock()
defer c.mu.Unlock()
@ -81,7 +81,7 @@ func (c *XChaCha20Cipher) Encrypt(plaintext []byte) (joined []byte, err error) {
return joined, nil
}
// Decrypt a value using AES-CMAC-SIV
// Decrypt a value using XChaCha20-Poly1305
func (c *XChaCha20Cipher) Decrypt(joined []byte) ([]byte, error) {
c.mu.Lock()
defer c.mu.Unlock()