MCPcopy Create free account
hub / github.com/bajrangCoder/setu / compute_hash

Method compute_hash

src/entities/response.rs:279–283  ·  view source on GitHub ↗

Compute hash for content change detection

(content: &[u8])

Source from the content-addressed store, hash-verified

277 if bytes.is_empty() {
278 return true;
279 }
280
281 let sample_len = bytes.len().min(512);
282 let sample = &bytes[..sample_len];
283
284 if std::str::from_utf8(sample).is_ok() {
285 return true;
286 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected