pub fn verify_signature(key: &[u8], msg: &[u8], signature: &[u8]) -> bool {
    let key = hmac::VerificationKey::new(&digest::SHA256, key);
    hmac::verify(&key, msg, signature)
        .map(|_| true)
        .unwrap_or(false)
}
/// Verifies a HMAC SHA256 signature.
Verifies a HMAC SHA256 signature.
Verifies a HMAC SHA256 signature .
pub fn verify_signature(key: &[u8], msg: &[u8], signature: &[u8]) -> bool {
    let key = hmac::VerificationKey::new(&digest::SHA256, key);
    hmac::verify(&key, msg, signature)
        .map(|_| true)
        .unwrap_or(false)
}
pub fn verify_signature ( key : & [ u8 ] , msg : & [ u8 ] , signature : & [ u8 ] ) -> bool { let key = hmac :: VerificationKey :: new ( & digest :: SHA256 , key ) ; hmac :: verify ( & key , msg , signature ) . map ( | _ | true ) . unwrap_or ( false ) }
Verifies a HMAC SHA256 signature.
Verifies a HMAC SHA256 signature .
key
&[u8]
msg
&[u8]
signature
&[u8]