[][src]Function ring::hmac::sign

pub fn sign(key: &SigningKey, data: &[u8]) -> Signature

Calculates the HMAC of data using the key key in one step.

Use SigningContext 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 signature. Use verify for verification instead.

C analog: HMAC_CTX_init + HMAC_Update + HMAC_Final.