[][src]Function ethers_core::utils::hash_message

pub fn hash_message<S>(message: S) -> H256 where
    S: AsRef<[u8]>, 

Hash a message according to EIP-191.

The data is a UTF-8 encoded string and will enveloped as follows: "\x19Ethereum Signed Message:\n" + message.length + message and hashed using keccak256.