processCtr static method

List<int> processCtr({
  1. required List<int> key,
  2. required List<int> iv,
  3. required List<int> data,
})

Implementation

static List<int> processCtr(
    {required List<int> key,
    required List<int> iv,
    required List<int> data}) {
  final CTR ctr = CTR(AES(key), iv);
  final xor = List<int>.filled(data.length, 0);
  ctr.streamXOR(data, xor);
  ctr.clean();
  return xor;
}