explicit_bzero

Function explicit_bzero 

Source
pub fn explicit_bzero(buf: &mut Vec<u8>)
๐Ÿ‘ŽDeprecated since 0.6.0: use zeroize::Zeroize instead
Expand description

Securely zero the memory in buf.

This function zeroes the full capacity of buf, erasing any sensitive data in it. It is a simple shim for zeroize and the latter should be used instead.

ยงUsage

The following are equivalent:

let mut buf = vec![1u8; 1];
// 1.
explicit_bzero(&mut buf);
// 2.
buf.zeroize();