generateBytes method

int generateBytes(
  1. Uint8List password,
  2. Uint8List out, [
  3. int outOff = 0,
  4. int? outLen,
])

Implementation

int generateBytes(Uint8List password, Uint8List out,
    [int outOff = 0, int? outLen]) {
  outLen ??= out.length;

  if (outLen < Argon2BytesGenerator.MIN_OUTLEN) {
    throw ArgumentError.value(outLen, 'outLen',
        'output length less than ${Argon2BytesGenerator.MIN_OUTLEN}');
  }

  var tmpBlockBytes = Uint8List(ARGON2_BLOCK_SIZE);

  _initialize(tmpBlockBytes, password, outLen);
  _fillMemoryBlocks();
  _digest(tmpBlockBytes, out, outOff, outLen);

  _reset();

  return outLen;
}