verify

Function verify 

pub fn verify(key: &Key, data: &[u8], tag: &[u8]) -> Result<(), Unspecified>
Available on crate feature crypto only.
Expand description

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

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

ยงErrors

error::Unspecified if the inputs are not verified or CMAC calculation fails.