sanitization 1.0.0-rc.1

Dependency-free no_std secret memory sanitization with safe defaults and an explicit volatile wipe backend.
Documentation
1
2
3
4
5
6
7
8
use sanitization::SecretBytes;

fn main() {
    let key = SecretBytes::<32>::from_fn(|index| index as u8);

    let key_len = key.expose_secret(|bytes| bytes.len());
    assert_eq!(key_len, 32);
}