Hash
ethHashMessage
Computes the EIP-191 personal-sign message digest to sign.
This prefixes the message with EthMessagePrefix | EthMessagePrefix 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.
This is the same as hashMessage
except it uses EthMessagePrefix
instead of MessagePrefix
and is available for
broader compatibility with EVM signing practices.
Parameters
Parameter | Type | Description |
---|---|---|
message | string | Uint8Array |
Returns
string
Source
Was this page helpful?