hashWith static method

ByteArray hashWith(
  1. String algorithm,
  2. ByteArray data
)

Performs hash operation with specified algorithm

Implementation

static ByteArray hashWith(String algorithm, ByteArray data) {
  final hasher = MochimoHasher(algorithm: algorithm);
  hasher.update(data);
  return hasher.digest();
}