[][src]Trait signature::DigestVerifier

pub trait DigestVerifier<D, S> where
    D: Digest,
    S: Signature
{ fn verify_digest(&self, digest: D, signature: &S) -> Result<(), Error>; }

Verify the provided signature for the given prehashed message Digest is authentic.

This trait is only available when the digest-preview cargo feature is enabled.

It accepts a [Digest] instance, as opposed to a raw digest byte array, as the security of signature algorithms built on hash functions often depends critically on the input being a random oracle as opposed to a value an attacker can choose and solve for. This is enforced at the API level by taking a [Digest] instance in order to better resist misuse.

Required methods

fn verify_digest(&self, digest: D, signature: &S) -> Result<(), Error>

Verify the signature against the given Digest output.

Loading content...

Implementors

Loading content...