hashTo method

void hashTo(
  1. Uint8List bytes,
  2. Uint8List output
)

Hash bytes and puts the result into output.

Implementation

void hashTo(Uint8List bytes, Uint8List output) {
  if (_destroyed) {
    _throwAlreadyDestroyed();
  }

  var inputPointer = _getInputPointer(bytes.length);
  inputPointer.setBytes(bytes);

  var outputPointers = _getOutputPointer();

  _functionRandomxHash(id, inputPointer, bytes.length, outputPointers);

  final outBytes = outputPointers.asTypedList(sizeOfHash);
  output.setAll(0, outBytes);
}