Skip to main content

hash_content

Function hash_content 

Source
pub fn hash_content(content: &str) -> String
Expand description

Hash content for storage key. Returns the full SHA-256 hex digest.

V80: was a 64-bit SipHash. store uses INSERT OR REPLACE, so a collision silently OVERWROTE a different entry’s content with no verification — and a 64-bit space collides (birthday) at ~65k entries, well within the 500-entry cache only if adversarial input is crafted; more importantly the value is a user-facing retrieval key. SHA-256 makes collisions infeasible.