pub fn hash_to_scalar<C, X, L>(
msg: &[&[u8]],
dst: &[&[u8]],
) -> Result<C::Scalar, X::Error>where
C: MapToCurve,
X: ExpandMsg<C::SecurityLevel>,
L: ArraySize + NonZero,
C::Scalar: Reduce<Array<u8, L>>,Expand description
Computes the hash to field routine according to https://www.rfc-editor.org/rfc/rfc9380.html#section-5-4 and returns a scalar.
For the expand_message call, len_in_bytes = <Self::FieldElement as FromOkm>::Length.
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.