decrypt method

Uint8List decrypt(
  1. List<int> iv,
  2. List<int> ciphertext
)

Decrypts ciphertext in one call.

Implementation

Uint8List decrypt(List<int> iv, List<int> ciphertext) {
  final s = decryptStream(iv);
  final out = BytesBuilder(copy: false)
    ..add(s.update(ciphertext))
    ..add(s.finish());
  return out.takeBytes();
}