Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChaCha20Poly1305Decrypt ¶
ChaCha20Poly1305Decrypt decrypts the given ciphertext with the given key and nonce using the ChaCha20-Poly1305 AEAD cipher. The plaintext is returned. The key length must be 32 bytes, and the nonce length must be 12 bytes.
func ChaCha20Poly1305Encrypt ¶
ChaCha20Poly1305Encrypt encrypts the given plaintext with the given key and nonce using the ChaCha20-Poly1305 AEAD cipher. The ciphertext is returned. The key length must be 32 bytes, and the nonce length must be 12 bytes.
func GenerateNonce ¶
func GenerateNonce() []byte
GenerateNonce generates a random 12-byte nonce using the crypto/rand package.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.