Hash
hashMessage
Computes the Quai Network equivalent of the EIP-191 personal-sign message digest to sign.
This prefixes the message with MessagePrefix and the decimal length of message
and
computes the keccak256 digest.
If message
is a string, it is converted to its UTF-8 bytes first. To compute the digest of a
DataHexString, it must be converted to bytes.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | Uint8Array | The message to hash. |
Returns
string
The message digest.
Example
Source
Was this page helpful?