Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

Verifier

Trait Verifier 

Source
pub trait Verifier<S> {
    // Required method
    fn verify(&self, msg: &[u8], signature: &S) -> Result<(), Error>;
}
Expand description

Verify the provided message bytestring using Self (e.g. a public key)

Required Methods§

Source

fn verify(&self, msg: &[u8], signature: &S) -> Result<(), Error>

Use Self to verify that the provided signature for a given message bytestring is authentic.

Returns Error if it is inauthentic, or otherwise returns ().

Implementations on Foreign Types§

Source§

impl Verifier<Signature<NistP521>> for VerifyingKey

Available on crate feature ecdsa only.
Source§

fn verify( &self, msg: &[u8], signature: &Signature<NistP521>, ) -> Result<(), Error>

Source§

impl<C> Verifier<Signature<C>> for VerifyingKey<C>

Available on crate feature der only.
Source§

fn verify(&self, msg: &[u8], signature: &Signature<C>) -> Result<(), Error>

Source§

impl<C> Verifier<Signature<C>> for VerifyingKey<C>

Source§

fn verify(&self, msg: &[u8], signature: &Signature<C>) -> Result<(), Error>

Source§

impl<D> Verifier<Signature> for VerifyingKey<D>

Source§

fn verify(&self, msg: &[u8], signature: &Signature) -> Result<(), Error>

Implementors§

Source§

impl<D> Verifier<Signature> for crypto_glue::rsa::pkcs1v15::VerifyingKey<D>
where D: Digest,