aesAuthDecrypt function
Implementation
Uint8List aesAuthDecrypt(
Uint8List encrypted, Uint8List aesKey, Uint8List iv, Uint8List tag,) {
final keyPair =
crypto_keys.KeyPair.symmetric(crypto_keys.SymmetricKey(keyValue: aesKey));
final encrypter = keyPair.publicKey!
.createEncrypter(crypto_keys.algorithms.encryption.aes.gcm);
final decrypted = encrypter.decrypt(crypto_keys.EncryptionResult(encrypted,
initializationVector: iv, authenticationTag: tag,),);
return decrypted;
}