hashTo method

void hashTo({
  1. required K key,
  2. required Uint8List output,
})

Implementation

void hashTo({required K key, required Uint8List output}) {
  final bytes = codec.encode(key);
  final int offset = hasher?.digestSize ?? 0;
  if (hasher != null) {
    hasher!.hashTo(data: bytes, output: output);
  }
  if (concat) {
    for (var i = 0; i < bytes.length; i++) {
      output[i + offset] = bytes[i];
    }
  }
}