Skip to main content

keyed_mac_truncated_parts

Function keyed_mac_truncated_parts 

pub fn keyed_mac_truncated_parts(key: &[u8; 32], parts: &[&[u8]]) -> [u8; 16]
Expand description

Multi-part variant of keyed_mac_truncated — authenticates the concatenation of parts without allocating a joined buffer.

keyed_mac_truncated_parts(k, &[a, b]) is byte-for-byte identical to keyed_mac_truncated(k, &[a, b].concat()) (both Blake3’s keyed hasher and HMAC are defined over the streamed input), so this is a zero-copy drop-in on the wire — used by the stream verifier to MAC prev_mac ‖ block over a borrowed payload slice instead of copying the block into a scratch Vec.