Skip to main content

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".

Implementors§