Skip to main content

message_bytes

Function message_bytes 

Source
pub fn message_bytes(v: &Value) -> Result<Vec<u8>, CryptoError>
Expand description

The bytes a message or hash input stands for.

A string is its UTF-8 bytes, so "r" and [114] are one message — bytes are bytes, whichever way they were spelled. nil is refused rather than read as empty: blue has two empties (nil != []), and a message that silently became nil is a bug to surface, not an empty string to sign.