verify

Function verify 

Source
pub fn verify(key: &Key, data: &[u8], tag: &[u8]) -> Result<(), Unspecified>
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.