Security Warning: The nonce MUST be unique for every encryption operation
with the same key. Reusing a nonce completely breaks the security of the
encryption scheme and can reveal plaintext.
Parameters
plaintext: Uint8Array
The data to encrypt
key: Uint8Array
32-byte encryption key
nonce: Uint8Array
12-byte nonce (MUST be unique per encryption with the same key)
Encrypt data using ChaCha20-Poly1305 AEAD cipher.
Security Warning: The nonce MUST be unique for every encryption operation with the same key. Reusing a nonce completely breaks the security of the encryption scheme and can reveal plaintext.