deriveKey method

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

Derive key from given input and put it in out at offset outOff.

Implementation

@override
int deriveKey(Uint8List inp, int inpOff, Uint8List out, int outOff) {
  if (_params == null) {
    throw StateError('Initialize first.');
  }

  _scryptJ(inp, inpOff, out, outOff, _params!.salt, _params!.N, _params!.r,
      _params!.p, _params!.desiredKeyLength);

  return keySize;
}