Skip to main content

secure_zero

Function secure_zero 

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

Overwrites data with zero bytes to reduce sensitive material lifetime in memory.

§Arguments

  • data — Mutable buffer cleared in place; length is unchanged.

§Returns

Returns unit; the buffer is always fully zeroed.

§Panics

This function does not panic.