hash static method

ByteArray hash(
  1. ByteArray data, [
  2. int? offset,
  3. int? length
])
override

Performs hash operation

Implementation

static ByteArray hash(ByteArray data, [int? offset, int? length]) {
  final hasher = MochimoHasher();
  if (offset != null && length != null) {
    hasher.update(data, offset, length);
  } else {
    hasher.update(data);
  }
  return hasher.digest();
}