aeadEncrypt method
Encrypts a message using AEAD.
Throws an AskarKeyException if encryption fails.
Implementation
EncryptedBuffer aeadEncrypt({
required Uint8List message,
Uint8List? nonce,
Uint8List? aad,
}) {
try {
return askarKeyAeadEncrypt(
localKeyHandle,
message,
nonce: nonce,
aad: aad,
).getValueOrException();
} catch (e) {
throw AskarKeyException('Error on AEAD Encryption: $e');
}
}