Skip to main content

secure_wipe

Function secure_wipe 

Source
pub fn secure_wipe(bytes: &mut [u8])
Expand description

Best-effort dependency-free wipe for caller-owned byte slices.

This is the same hardened cleanup primitive used internally by the core crate: byte-wise volatile zero writes followed by the crate’s architecture-gated wipe barrier and a compiler fence. It is exposed so companion crates and integrations can reuse the audited cleanup boundary without duplicating unsafe code.

This is not a formal zeroization guarantee. It cannot clear historical copies, registers, caches, swap, hibernation images, core dumps, or OS-level memory snapshots. High-assurance applications still need their own platform-approved memory hygiene controls.