Skip to main content

boxed_bytes_zeroed

Function boxed_bytes_zeroed 

Source
pub fn boxed_bytes_zeroed(len: usize) -> Box<[u8]>
Expand description

Allocate an exact-size boxed byte slice initialized to zero.

The temporary Vec contains only zeroes. Secret bytes must be written only after conversion to the exact-size boxed slice.