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

Function verify_key

atomic-objects/src/lib.rs:55–57  ·  view source on GitHub ↗

Whether `bytes` hash to `key` — the content-addressed integrity check the bare server runs on every `PUT /{family}/{key}` before storing.

(key: &str, bytes: &[u8])

Source from the content-addressed store, hash-verified

53/// Whether `bytes` hash to `key` — the content-addressed integrity check the
54/// bare server runs on every `PUT /{family}/{key}` before storing.
55pub fn verify_key(key: &str, bytes: &[u8]) -> bool {
56 content_key(bytes) == key
57}

Callers

nothing calls this directly

Calls 1

content_keyFunction · 0.85

Tested by

no test coverage detected