Sha256: dd1af63ef2cba2120c6f775350c98eb12bb1be6ba784d5350d07d4ae5419c292
Contents?: true
Size: 510 Bytes
Versions: 33
Compression:
Stored size: 510 Bytes
Contents
use crate::{ArrayLength, GenericArray}; use zeroize::Zeroize; impl<T: Zeroize, N: ArrayLength<T>> Zeroize for GenericArray<T, N> { fn zeroize(&mut self) { self.as_mut_slice().iter_mut().zeroize() } } #[cfg(test)] mod tests { use super::*; #[test] fn test_zeroize() { let mut array = GenericArray::<u8, typenum::U2>::default(); array[0] = 4; array[1] = 9; array.zeroize(); assert_eq!(array[0], 0); assert_eq!(array[1], 0); } }
Version data entries
33 entries across 33 versions & 1 rubygems