pub fn decode(input: &str, key: &[u8]) -> Result<Claims, DecodeError> {
        decode_generic(input, |header64: &[u8], payload64: &[u8]| {
            let mut hmac = crypto::hmac::HMAC(crypto::hash::HashType::SHA256, key);
            hmac.update(header64);
            hmac.update(b".");
            hmac.update(payload64);
            hmac.finalize()
        })
    }
/// Decode a JWT signed with HMAC-SHA256.
Decode a JWT signed with HMAC-SHA256.
Decode a JWT signed with HMAC - SHA256 .
pub fn decode(input: &str, key: &[u8]) -> Result<Claims, DecodeError> {
        decode_generic(input, |header64: &[u8], payload64: &[u8]| {
            let mut hmac = crypto::hmac::HMAC(crypto::hash::HashType::SHA256, key);
            hmac.update(header64);
            hmac.update(b".");
            hmac.update(payload64);
            hmac.finalize()
        })
    }
pub fn decode ( input : & str , key : & [ u8 ] ) -> Result < Claims , DecodeError > { decode_generic ( input , | header64 : & [ u8 ] , payload64 : & [ u8 ] | { let mut hmac = crypto :: hmac :: HMAC ( crypto :: hash :: HashType :: SHA256 , key ) ; hmac . update ( header64 ) ; hmac . update ( b" " ) ; hmac . update ( payload64 ) ; hmac . finalize ( ) } ) }
Decode a JWT signed with HMAC-SHA256.
Decode a JWT signed with HMAC - SHA256 .
input
&str
key
&[u8]
input
&str
key
&[u8]