decrypt method

Uint8List decrypt(
  1. Uint8List cipherText,
  2. Uint8List iv
)

Implementation

Uint8List decrypt(Uint8List cipherText, Uint8List iv) {
final cipher = pointy.GCMBlockCipher(pointy.AESEngine())
  ..init(
    false, // decrypt
    pointy.AEADParameters(
      pointy.KeyParameter(_key), // the 256 bit (32 byte) key
      128,  //Mac length
      iv, // the 12 byte nonce
      Uint8List(0), // empty extra data
    ));
  return cipher.process(cipherText);
}