data.
The data must be a data representation, to compute the hash of UTF-8 data use the [id}(../functions/id)
function.
Parameters
Returns
string
DataHexstring
The hash of the data.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
function keccak256(_data): string
data.
The data must be a data representation, to compute the hash of UTF-8 data use the [id}(../functions/id)
function.
| Parameter | Type | Description |
|---|---|---|
_data | BytesLike | The data to hash. |
string
DataHexstring
The hash of the data.
keccak256('0x');
keccak256('0x1337');
keccak256(new Uint8Array([0x13, 0x37]));
// Strings are assumed to be DataHexString, otherwise it will
// throw. To hash UTF-8 data, see the note above.
keccak256('Hello World');
Was this page helpful?
