xsalsa20Poly1305<T extends Object?> static method
Runs use with a fresh XSalsa20-Poly1305 AEAD built from key, then wipes it.
The instance must be clean after you don't need it; this method
guarantees that, even if use throws.
Implementation
static T xsalsa20Poly1305<T extends Object?>(
List<int> key,
T Function(BuAead cipher) use,
) {
final cipher = xsalsa20Poly1305Instance(key);
try {
return use(cipher);
} finally {
cipher.clean();
}
}