MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / content_hash

Function content_hash

src/sync.rs:96–101  ·  view source on GitHub ↗

Compute SHA-256 content hash of file content.

(content: &str)

Source from the content-addressed store, hash-verified

94
95/// Compute SHA-256 content hash of file content.
96pub fn content_hash(content: &str) -> String {
97 let mut hasher = Sha256::new();
98 hasher.update(content.as_bytes());
99 let result = hasher.finalize();
100 hex::encode(result)
101}
102
103/// Find files whose stored content hash differs from the current hash.
104pub async fn find_stale_files(

Callers 8

process_requestFunction · 0.85
short_branch_hashFunction · 0.85
extract_files_in_processFunction · 0.85
sync_single_filesMethod · 0.85
reindex_fileMethod · 0.85

Calls

no outgoing calls

Tested by 2