Keccak256
Calculate Keccak-256 hash from strings with support for multiple input encodings. Keccak-256 is the hash function used in Ethereum.
Input Encoding
Standard text encoding
Input String
About Keccak-256
- • Keccak-256 is the hash function used by Ethereum for addresses, signatures, and transaction hashes.
- • It produces a 256-bit (32-byte) hash output.
- • Note: Keccak-256 differs slightly from the standardized SHA-3-256 (FIPS 202).
- • The 0x prefix indicates hexadecimal format, commonly used in Ethereum.
Common Use Cases
- • Function Selectors: First 4 bytes of keccak256("functionName(argTypes)")
- • Event Topics: keccak256("EventName(argTypes)")
- • Address Generation: Last 20 bytes of keccak256(publicKey)
- • Message Signing: Hash messages before signing