keyring 4.1.2

All-in-One Rust Keyring
Documentation
1
2
3
4
5
6
7
8
9
10
11
use keyring::{Entry, Result};

fn main() -> Result<()> {
    let entry = Entry::new("my-service", "my-name")?;
    //noinspection SpellCheckingInspection
    entry.set_password("topS3cr3tP4$$w0rd")?;
    let password = entry.get_password()?;
    println!("My password is '{password}'");
    entry.delete_credential()?;
    Ok(())
}