[][src]Function ring::hmac::verify_with_own_key

pub fn verify_with_own_key(
    key: &SigningKey,
    data: &[u8],
    signature: &[u8]
) -> Result<(), Unspecified>

Calculates the HMAC of data using the signing key key, and verifies whether the resultant value equals signature, in one step.

This is logically equivalent to, but more efficient than, constructing a VerificationKey with the same value as key and then using verify.

The verification will be done in constant time to prevent timing attacks.