pub trait FromDigest<C: PrimeCurve> {
// Required method
fn from_digest<D>(digest: D) -> Self
where D: Digest<OutputSize = FieldSize<C>>;
}
Available on crate features
hazmat
and digest
only.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§
Sourcefn from_digest<D>(digest: D) -> Self
fn from_digest<D>(digest: D) -> Self
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", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl FromDigest<MockCurve> for Scalar
Available on crate feature dev
only.
impl FromDigest<MockCurve> for Scalar
Available on crate feature
dev
only.Source§fn from_digest<D>(digest: D) -> Self
fn from_digest<D>(digest: D) -> Self
Available on crate features
hazmat
and digest
only.