decrypt method

  1. @override
FutureOr<int> decrypt(
  1. Uint8List inp,
  2. int inpOff,
  3. int inpLength,
  4. Uint8List out,
  5. int outOff,
)
override

Decrypt the given bytes.

  • inp: the total encrypted bytes
  • inpOff: the byte offset to start decryption at
  • inpLength: the number of bytes (length) to decrypt
  • out: the buffer to write the decrypted output in
  • outOff: the byte offset to write the decrypted output to

returns the length of the new decrypted output

Implementation

@override
FutureOr<int> decrypt(
    Uint8List inp, int inpOff, int inpLength, Uint8List out, int outOff) {
  var iv = inp.view(inpOff, 16);

  return _cipher.decrypt(iv, inp, inpOff + 16, inpLength - 16, out, 0);
}