Symmetric encryption using XChaCha20-Poly1305-IETF.
The key is expected to be 256 bits in size.
The nonce is randomly generated.
The resulting cipher text will be have the following format:
nonce || mac || cipherText
This is an authenticated form of encryption.
The mac provides integrity and authenticity.
The returned buffers are guaranteed to unpooled.
This means the underlying ArrayBuffer is safely transferrable.
Symmetric encryption using XChaCha20-Poly1305-IETF. The key is expected to be 256 bits in size. The nonce is randomly generated. The resulting cipher text will be have the following format:
nonce || mac || cipherText
This is an authenticated form of encryption. The mac provides integrity and authenticity. The returned buffers are guaranteed to unpooled. This means the underlyingArrayBuffer
is safely transferrable.