package core:crypto/chacha20poly1305
Overview
package chacha20poly1305 implements the AEAD_CHACHA20_POLY1305 Authenticated Encryption with Additional Data algorithm.
See: https://www.rfc-editor.org/rfc/rfc8439
Index
Types (0)
This section is empty.
Constants (3)
Variables (0)
This section is empty.
Procedure Groups (0)
This section is empty.
Types
This section is empty.
Constants
NONCE_SIZE ¶
NONCE_SIZE :: chacha20.NONCE_SIZE
NONCE_SIZE is the chacha20poly1305 nonce size in bytes.
Variables
This section is empty.
Procedures
decrypt ¶
decrypt authenticates the aad and ciphertext, and decrypts the ciphertext, with the provided key, nonce, and tag, and stores the output in plaintext, returning true iff the authentication was successful.
If authentication fails, the destination plaintext buffer will be zeroed.
encrypt ¶
encrypt :: proc( ciphertext, tag, key, nonce, aad, plaintext: []u8, ) {…}
encrypt encrypts the plaintext and authenticates the aad and ciphertext, with the provided key and nonce, stores the output in ciphertext and tag.
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-04 (vendor "odin") Windows_amd64 @ 2024-04-17 21:10:29.259929100 +0000 UTC