Function sign
pub fn sign(key: &Key, data: &[u8]) -> Result<Tag, Unspecified>Available on crate features
crypto and aws-lc only.Expand description
Calculates the CMAC of data using the key key in one step.
Use Context to calculate CMACs where the input is in multiple parts.
It is generally not safe to implement CMAC verification by comparing the
return value of sign to a tag. Use verify for verification instead.
§Errors
error::Unspecified if the CMAC calculation fails.