sha256 static method

MultihashInfo sha256(
  1. Uint8List hash
)

Encodes hash with the SHA2-256 multihash function.

Implementation

static dm.MultihashInfo sha256(Uint8List hash) {
  if (hash.length != 32) {
    throw ArgumentError('SHA2-256 digest must be 32 bytes');
  }
  return dm.Multihash.encode('sha2-256', hash);
}