web3_sha3 - Zeta

Returns Keccak-256 (not the standardized SHA3-256) of the given data.

Parameters

DATA - the data in hex form to convert into a SHA3 hash

Note: web3_sha3 takes in a hexidecimal number, not a direct string. So, if you wanted to convert "hello world" to it's Keccak-256 hash you would need to input the hex number for "hello world", which is "68656c6c6f20776f726c64".

params: [
  "0x68656c6c6f20776f726c64"
]

Returns

DATA - The SHA3 result of the given string.


Example

Request

curl --location 'http://zetachain-athens-3.unifra.io/v1/{your-api-key}' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc":"2.0",
    "method":"web3_sha3",
    "params":["0x68656c6c6f20776f726c64"],
    "id":64
}
'

Result

{
    "jsonrpc": "2.0",
    "id": 64,
    "result": "0x5b2c76da96136d193336fad3fbc049867b8ca157da22f69ae0e4923648250acc"
}
Language
Click Try It! to start a request and see the response here!