ssb_crypto/
utils.rs

1//! crypto util(s). Just `memzero` for now.
2use core::convert::TryInto;
3use zeroize::Zeroize;
4
5/// Securely zero-out a slice of memory.
6pub fn memzero(b: &mut [u8]) {
7    b.zeroize()
8}
9
10pub(crate) fn as_array_32(b: &[u8]) -> [u8; 32] {
11    b.try_into().unwrap()
12}