reliakit-secret 0.1.0

Secret-safe wrappers for Rust values that should not leak through formatting or diagnostics.
Documentation
1
2
3
4
5
6
7
8
9
10
use reliakit_secret::{ExposeSecret, Secret, SecretString};

fn main() {
    let api_key = Secret::new("rk_live_example");
    let password = SecretString::from_string("correct horse battery staple");

    println!("api key: {api_key}");
    println!("password: {password:?}");
    println!("api key length: {}", api_key.expose_secret().len());
}