Skip to main content

Verifier

Trait Verifier 

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§

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 ().

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

§

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

Available on crate feature der only.
§

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

§

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

§

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

Implementors§