Skip to main content

hmac_sha512

Function hmac_sha512 

Source
pub fn hmac_sha512(key: &[u8], data: &[u8]) -> Result<[u8; 64]>
Available on (crate features mac-hmac or mac-blake3) and crate feature mac-hmac only.
Expand description

Compute an HMAC-SHA512 tag over data under key.

§Errors

Same as hmac_sha256.

§Example

use crypt_io::mac;
let tag = mac::hmac_sha512(b"shared key", b"message")?;
assert_eq!(tag.len(), 64);