Skip to main content

hash_message

Function hash_message 

Source
pub fn hash_message(message: impl AsRef<[u8]>) -> B256
Expand description

Hash a message the way TronWeb signMessageV2 does.

Strings are hashed as UTF-8 bytes: "0x1234" is 6 plaintext bytes, not hex.