Skip to main content

secure_zero

Function secure_zero 

Source
pub fn secure_zero(data: &mut [u8])
Expand description

Explicitly overwrite every initialized byte in a slice.

The implementation uses safe-Rust writes plus compiler_fence and black_box as best-effort optimization barriers. It does not claim compiler-guaranteed physical erasure of registers, copies, or freed memory.