Skip to main content

hash_from_bytes

Function hash_from_bytes 

Source
pub fn hash_from_bytes<C, X>(
    msg: &[&[u8]],
    dst: &[&[u8]],
) -> Result<ProjectivePoint<C>, X::Error>
Expand description

Computes the hash to curve routine. See GroupDigest::hash_from_bytes() for more details.

For the expand_message call, len_in_bytes = <Self::FieldElement as FromOkm>::Length * 2. This value must be less than u16::MAX or otherwise a compiler error will occur.

ยงErrors

When the chosen ExpandMsg implementation returns an error. See ExpandMsgXmdError and ExpandMsgXofError for examples.