pub fn redact(input: &[u8]) -> RedactionOutcomeExpand description
Scans input (treated as best-effort UTF-8 via lossy conversion) for known secret shapes
and replaces each match with a marker identifying the kind of secret found. Returns the
redacted bytes plus a count of total replacements made.
This is a best-effort safety net, not a strict parser: invalid UTF-8 in input is handled
via String::from_utf8_lossy, which substitutes the standard replacement character for any
invalid byte sequences before the patterns below are applied.