MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / mac

Method mac

atomic-agent/src/turn/capture.rs:160–165  ·  view source on GitHub ↗

Compute the MAC under `key_hex` (64 hex chars → 32 bytes).

(key_hex: &str, input: &[u8])

Source from the content-addressed store, hash-verified

158
159 /// Compute the MAC under `key_hex` (64 hex chars → 32 bytes).
160 fn mac(key_hex: &str, input: &[u8]) -> String {
161 let key = mac_key_bytes(key_hex);
162 let mut hasher = blake3::Hasher::new_keyed(&key);
163 hasher.update(input);
164 hasher.finalize().to_hex().to_string()
165 }
166
167 /// Sign this capture in place with the session's MAC key.
168 pub fn sign(&mut self, key_hex: &str) {

Callers

nothing calls this directly

Calls 4

mac_key_bytesFunction · 0.85
updateMethod · 0.45
to_hexMethod · 0.45
finalizeMethod · 0.45

Tested by

no test coverage detected