xsalsa20Poly1305Encrypt static method
Encrypt with XSalsa20-Poly1305 (NaCl secretbox order:
16-byte tag || ciphertext).
Implementation
static BuBytes xsalsa20Poly1305Encrypt({
required List<int> key,
required List<int> nonce,
required List<int> plainText,
}) {
return xsalsa20Poly1305(key, (box) {
return box.encrypt(nonce, plainText);
});
}