Skip to main content

keyed_mac

Function keyed_mac 

pub fn keyed_mac(key: &[u8; 32], data: &[u8]) -> [u8; 32]
Expand description

Compute a 32-byte keyed MAC.

§Arguments

  • key - 32-byte MAC key
  • data - Data to authenticate

§Returns

32-byte MAC tag.

§Backend Behavior

  • Blake3: Uses blake3::keyed_hash(key, data)
  • FIPS: Uses HMAC-SHA256(key, data)