Skip to main content

redact

Function redact 

Source
pub fn redact(chunk: &[u8], secrets: &[impl AsRef<[u8]>]) -> Vec<u8> 
Expand description

Replace every occurrence of each secret in chunk with [redacted].

Chunk-level replacement is the guarantee the tests hold; a secret split exactly across a chunk boundary is out of reach here, which is one more reason no step ever prints one.