aesAuthEncrypt function
Implementation
AesAuthEncryptInfos aesAuthEncrypt(
Uint8List data,
Uint8List aesKey,
Uint8List iv,
) {
final keyPair =
crypto_keys.KeyPair.symmetric(crypto_keys.SymmetricKey(keyValue: aesKey));
final encrypter = keyPair.publicKey!
.createEncrypter(crypto_keys.algorithms.encryption.aes.gcm);
final v = encrypter.encrypt(data, initializationVector: iv);
return AesAuthEncryptInfos(tag: v.authenticationTag, encrypted: v.data);
}