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

Function is_blake3_key

atomic-repository/src/git_binding/pack.rs:361–366  ·  view source on GitHub ↗

Whether `key` is a 64-character lowercase-hex blake3 key.

(key: &str)

Source from the content-addressed store, hash-verified

359
360/// Whether `key` is a 64-character lowercase-hex blake3 key.
361fn is_blake3_key(key: &str) -> bool {
362 key.len() == 64
363 && key
364 .bytes()
365 .all(|byte| byte.is_ascii_digit() || (b'a'..=b'f').contains(&byte))
366}
367
368/// A hash-verified, privacy-quarantined view of one pack: decoded changes
369/// keyed by content hash.

Callers 2

decode_changes_packFunction · 0.85
quarantine_change_recordFunction · 0.85

Calls 4

lenMethod · 0.45
allMethod · 0.45
bytesMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected