aegis-vault

Crates.ioaegis-vault
lib.rsaegis-vault
version
sourcesrc
created_at2023-07-23 23:03:34.11734+00
updated_at2025-03-23 04:19:21.54267+00
descriptionLibrary for parsing and dumping Aegis vaults
homepagehttps://github.com/louib/aegis-vault-rs
repositoryhttps://github.com/louib/aegis-vault-rs
max_upload_size
id924064
Cargo.toml error:TOML parse error at line 22, column 1 | 22 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(louib)

documentation

https://docs.rs/aegis-vault

README

aegis-vault-rs

Build Status dependency status Crates.io License file

Library for parsing and dumping Aegis vaults

Documentation for the Aegis vault format can be found here

The codebase was initially imported from the Gnome Authenticator project.

Usage

Save a database

use aegis_vault::{
    vault::{Aegis, Entry},
    algorithm::{Method}
};
use anyhow::Result;
use std::fs::File;

fn main() -> Result<()> {
    let mut vault = Aegis::default();

    let mut otp_entry = Entry::default();
    otp_entry.method = Method::TOTP;
    otp_entry.label = "Mason".to_string();
    otp_entry.issuer = Some("Deno".to_string());
    otp_entry.info.secret = "4SJHB4GSD43FZBAI7C2HLRJGPQ".to_string();
    otp_entry.info.period = Some(30);
    otp_entry.info.digits = 6;
    otp_entry.info.counter = None;
    vault.add_entry(otp_entry);

    vault.save(
      &mut File::create("my-aegis-vault.json")?,
      "password",
    )?;

    Ok(())
}

Open a database

TODO

License

GPL-3

Commit count: 62

cargo fmt