hash160 function

Uint8List hash160(
  1. Uint8List buffer
)

This function calculates the hash160 digest of a given Uint8List buffer.

Implementation

Uint8List hash160(Uint8List buffer) {
  /// Calculate the SHA-256 hash of the input buffer.
  Uint8List tmp = SHA256Digest().process(buffer);

  /// Calculate the RIPEMD-160 hash of the SHA-256 hash.
  return RIPEMD160Digest().process(tmp);
}