Skip to main content

secure_clone_and_zero

Function secure_clone_and_zero 

Source
pub fn secure_clone_and_zero(data: &mut [u8]) -> Box<[u8]>
Expand description

Clone a slice into exact-size storage, then explicitly clear the source afterwards.

This function clones the contents of the slice and then invokes the same best-effort initialized-byte clearing used by secure_zero.