web3_sha3

Returns the keccak-256 (not the standarized sha3-256) of the given data.

Parametersarrow-up-right

Name
Type
Description

Data

HexString

Data to calculate the hash from.

Return Typearrow-up-right

HexString - The keccak-256 digest of the given data.

Examplearrow-up-right

await provider.request({
  method: "web3_sha3",
  params: ["0x68656c6c6f20776f726c64"],
});
// "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"

Last updated

Was this helpful?