Function ethers_core::utils::hash_message
source · pub fn hash_message<T: AsRef<[u8]>>(message: T) -> H256
Expand description
Hash a message according to EIP-191 (version 0x01
).
The final message is a UTF-8 string, encoded as follows:
"\x19Ethereum Signed Message:\n" + message.length + message
This message is then hashed using Keccak-256.