pub trait VerifyingAlgorithm {
    // Required methods
    fn algorithm_type(&self) -> AlgorithmType;
    fn verify_bytes(
        &self,
        header: &str,
        claims: &str,
        signature: &[u8]
    ) -> Result<bool, Error>;

    // Provided method
    fn verify(
        &self,
        header: &str,
        claims: &str,
        signature: &str
    ) -> Result<bool, Error> { ... }
}
Expand description

An algorithm capable of verifying base64 encoded header and claims strings.

Required Methods§

source

fn algorithm_type(&self) -> AlgorithmType

source

fn verify_bytes( &self, header: &str, claims: &str, signature: &[u8] ) -> Result<bool, Error>

Provided Methods§

source

fn verify( &self, header: &str, claims: &str, signature: &str ) -> Result<bool, Error>

Implementations on Foreign Types§

source§

impl<D> VerifyingAlgorithm for Hmac<D>

source§

fn algorithm_type(&self) -> AlgorithmType

source§

fn verify_bytes( &self, header: &str, claims: &str, signature: &[u8] ) -> Result<bool, Error>

Implementors§