Hash
Utility functions for hashing (keccak256, sha256, etc).
Examples
import { Hash } from 'ox'
const value = Hash.keccak256('0xdeadbeef')
// '0xd4fd4e189132273036449fc9e11198c739161b4c0116a9a2dccdfa1c492006f1'
Functions
Name | Description |
---|---|
Hash.keccak256 | Calculates the Keccak256 hash of a Bytes.Bytes or Hex.Hex value. |
Hash.ripemd160 | Calculates the Ripemd160 hash of a Bytes.Bytes or Hex.Hex value. |
Hash.sha256 | Calculates the Sha256 hash of a Bytes.Bytes or Hex.Hex value. |
Hash.validate | Checks if a string is a valid hash value. |