Skip to main content

web3_sha3

web3_sha3

Returns a SHA3 hash of the specified data. The result value is a Keccak-256 hash, not the standardized SHA3-256.

Parameters

data: [Required] string - data to convert to a SHA3 hash.

Returns

result: string - SHA3 result of the input data.

Example

Replace <YOUR-API-KEY> with an API key from your MetaMask Developer dashboard.

Request

curl https://scroll-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "web3_sha3", "params":["0x68656c6c6f20776f726c00"], "id": 1}'

Response

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x5e39a0a66544c0668bde22d61c47a8710000ece931f13b84d3b2feb44ec96d3f"
}