Trait Verifier

pub trait Verifier {
    type Error: Into<Box<dyn Error + Sync + Send>>;
    type Output;

    // Required method
    fn verify(
        &self,
        payload: &[u8],
        signatures: &[ToVerifySignature],
    ) -> Result<Self::Output, Self::Error>;
}
Expand description

Verifier will be called to confirm if the received data is valid

For some algorithms all signatures need to be valid, but there are also cases when only one or some need to be valid.

Warning: in some cases order of signatures is not always pre-determined, so in those cases make sure that Verifier can handle this.

Required Associated Types§

type Error: Into<Box<dyn Error + Sync + Send>>

type Output

Required Methods§

fn verify( &self, payload: &[u8], signatures: &[ToVerifySignature], ) -> Result<Self::Output, Self::Error>

Verify if data is valid

Implementors§