Skip to main content

FromDigest

Trait FromDigest 

Source
pub trait FromDigest<C: Curve> {
    // Required method
    fn from_digest<D>(digest: D) -> Self
       where D: Digest<OutputSize = FieldSize<C>>;
}
Expand description

Instantiate this type from the output of a digest.

This trait is intended for use in ECDSA and should perform a conversion which is compatible with the rules for calculating h from H(M) set out in RFC6979 section 2.4. This conversion cannot fail.

This trait may also be useful for other hash-to-scalar or hash-to-curve use cases.

Required Methods§

Source

fn from_digest<D>(digest: D) -> Self
where D: Digest<OutputSize = FieldSize<C>>,

Instantiate this type from a Digest instance

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§