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 (e.g. a verifying key) to verify that the provided signature is authentic for a given message bytestring.

Returns Ok(()) if the signature is authentic for the given message.

§Errors

Returns Error if the provided signature is inauthentic for the given message.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

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

Source§

fn verify(&self, msg: &[u8], signature: &Signature<C>) -> 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<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,