pub trait ExpandMsg<K> {
type Hash;
type Expander<'dst>: Expander + Sized;
type Error: Error;
// Required method
fn expand_message<'dst>(
msg: &[&[u8]],
dst: &'dst [&[u8]],
len_in_bytes: NonZero<u16>,
) -> Result<Self::Expander<'dst>, Self::Error>;
}Expand description
Trait for types implementing expand_message interface for hash_to_field.
K is the target security level in bytes:
https://www.rfc-editor.org/rfc/rfc9380.html#section-8.9-2.2
https://www.rfc-editor.org/rfc/rfc9380.html#name-target-security-levels
§Errors
See implementors of ExpandMsg for errors.
Required Associated Types§
Sourcetype Error: Error
type Error: Error
Error returned by ExpandMsg::expand_message.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.