Skip to main content

resolve_hasher_message

Function resolve_hasher_message 

Source
pub fn resolve_hasher_message(
    mode: &HasherMode,
    instance: &HasherInstance,
) -> Result<Vec<u8>>
Expand description

Resolve a HasherInstance into the concrete message bytes to hash, validated against mode.

A --message string is used verbatim; otherwise reproducible random bytes are generated with length --random-message-len (defaulting to mode’s capacity). The resulting length must be compatible with the circuit: exactly the fixed length, or at most the variable-length maximum.