pub fn sign(key: &Key, data: &[u8]) -> Tag
Calculates the HMAC of
data using the key
key in one step.
Context to calculate HMACs where the input is in multiple parts.
It is generally not safe to implement HMAC verification by comparing the
return value of
sign to a tag. Use
verify for verification instead.