encrypt method

  1. @override
int encrypt(
  1. Uint8List inp,
  2. int inpOff,
  3. int inpLength,
  4. Uint8List out,
  5. int outOff,
)
override

Encrypt the given bytes.

Implementation

@override
int encrypt(
    Uint8List inp, int inpOff, int inpLength, Uint8List out, int outOff) {
  var iv = generateIv();
  out.setAll(outOff, iv);

  var len = _cipher.encrypt(iv, inp, 0, inpLength, out, outOff + 16);

  return len + 16;
}