pub fn verify(
        self,
        expected_signature: &[u8],
        data: &[u8],
        secret: &Secret,
    ) -> Result<(), Error> {
        use self::SignatureAlgorithm::*;

        match self {
            None => Self::verify_none(expected_signature, secret),
            HS256 | HS384 | HS512 => Self::verify_hmac(expected_signature, data, secret, self),
            RS256 | RS384 | RS512 | PS256 | PS384 | PS512 | ES256 | ES384 | ES512 => {
                Self::verify_public_key(expected_signature, data, secret, self)
            }
        }
    }
/// Verify signature based on the algorithm and secret provided.
Verify signature based on the algorithm and secret provided.
Verify signature based on the algorithm and secret provided .
pub fn verify(
        self,
        expected_signature: &[u8],
        data: &[u8],
        secret: &Secret,
    ) -> Result<(), Error> {
        use self::SignatureAlgorithm::*;
        match self {
            None => Self::verify_none(expected_signature, secret),
            HS256 | HS384 | HS512 => Self::verify_hmac(expected_signature, data, secret, self),
            RS256 | RS384 | RS512 | PS256 | PS384 | PS512 | ES256 | ES384 | ES512 => {
                Self::verify_public_key(expected_signature, data, secret, self)
            }
        }
    }
pub fn verify ( self , expected_signature : & [ u8 ] , data : & [ u8 ] , secret : & Secret , ) -> Result < ( ) , Error > { use self :: SignatureAlgorithm :: * ; match self { None => Self :: verify_none ( expected_signature , secret ) , HS256 | HS384 | HS512 => Self :: verify_hmac ( expected_signature , data , secret , self ) , RS256 | RS384 | RS512 | PS256 | PS384 | PS512 | ES256 | ES384 | ES512 => { Self :: verify_public_key ( expected_signature , data , secret , self ) } } }
Verify signature based on the algorithm and secret provided.
Verify signature based on the algorithm and secret provided .
self
expected_signature
&[u8]
data
&[u8]
secret
&Secret
self
expected_signature
&[u8]
data
&[u8]
secret
&Secret