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.
```rust use aegis_vault::{ vault::{Aegis, Item}, algorithm::{Method} }; use anyhow::Result; use std::fs::File;
fn main() -> Result<()> { let mut vault = Aegis::default();
let mut otp_item = Item::default();
otp_item.method = Method::TOTP;
otp_item.label = "Mason".to_string();
otp_item.issuer = Some("Deno".to_string());
otp_item.info.secret = "4SJHB4GSD43FZBAI7C2HLRJGPQ".to_string();
otp_item.info.period = Some(30);
otp_item.info.digits = 6;
otp_item.info.counter = None;
vault.add_item(otp_item);
vault.save(
&mut File::create("my-aegis-vault.json")?,
"password",
)?;
Ok(())
} ```
TODO
GPL-3