aesGcmDecryptPrimitive function

Uint8List aesGcmDecryptPrimitive(
  1. Uint8List key,
  2. Uint8List nonce,
  3. Uint8List ciphertext,
  4. Uint8List tag,
  5. Uint8List aad,
)

Implementation

Uint8List aesGcmDecryptPrimitive(
  Uint8List key,
  Uint8List nonce,
  Uint8List ciphertext,
  Uint8List tag,
  Uint8List aad,
) {
  return decrypt(
    encryptionKey: key,
    ciphertextWithAuthTag: Uint8List.fromList([...ciphertext, ...tag]),
    nonce: nonce,
    aead: aad,
  );
}