web3_sha3

The web3_sha3 method returns the Keccak-256 hash of the given data. This method computes the cryptographic hash using the Keccak-256 algorithm, which is the hashing function used throughout Ethereum (note: despite being called SHA3, Ethereum uses Keccak-256, which differs slightly from the final SHA3-256 standard).

This method is essential for various Ethereum development tasks including generating function selectors for smart contract calls, computing event signatures for filtering logs, creating commitment hashes, and performing other cryptographic operations. The input data must be hex-encoded with a 0x prefix. Developers commonly use this to locally compute hashes that need to match on-chain calculations, verify data integrity, or generate identifiers for off-chain indexing.


Parameters

parameter
type
description
data
string (required)
The data to hash (hex-encoded with 0x prefix)
Return Object
field
type
description
result
string
The Keccak-256 hash of the given data as a hexadecimal string
Request Example
Request
Response Example
Response

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?