Skip to main content

redaction_algorithm_fingerprint

Function redaction_algorithm_fingerprint 

Source
pub fn redaction_algorithm_fingerprint() -> String
Expand description

Stable identifier for the compiled SECRET_PATTERNS list.

Memoization keys for [MemoizingRedactor] combine input content with this fingerprint so a pattern bump (new regex added, existing regex tightened) automatically invalidates every prior cache entry — silent stale cross-version reuse is impossible by construction.

The fingerprint is redact-v1:<blake3-hex> where the hash covers every pattern source string concatenated with NUL separators. The v1 epoch lets future maintainers force a manual bump even when the regex source set hasn’t changed (e.g. if the replacement constant changes from [REDACTED] to something else).