register static method

void register(
  1. HashBase<HashDigestSink> algo, [
  2. String? name
])

Register a new HashBase algorithm on the fly given a string name

Implementation

static void register(HashBase algo, [String? name]) {
  _buildRegistry();
  name = _norm(name ?? algo.name);
  _hash[name] = algo;
  if (algo is BlockHashBase) {
    _blockHash[name] = algo;
  }
}