MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / hmac_roundtrip

Function hmac_roundtrip

nodedb-cluster/src/rpc_codec/mac.rs:116–120  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

114
115 #[test]
116 fn hmac_roundtrip() {
117 let key = MacKey::from_bytes([7u8; MAC_LEN]);
118 let tag = compute_hmac(&key, b"hello world");
119 verify_hmac(&key, b"hello world", &tag).unwrap();
120 }
121
122 #[test]
123 fn hmac_rejects_tampered_data() {

Callers

nothing calls this directly

Calls 2

verify_hmacFunction · 0.85
compute_hmacFunction · 0.70

Tested by

no test coverage detected