Crates.io | keepass-db |
lib.rs | keepass-db |
version | 0.0.2 |
source | src |
created_at | 2023-09-12 18:52:32.273632 |
updated_at | 2023-10-01 06:18:43.682325 |
description | KeePass password database library and tools |
homepage | https://github.north-winds.org/keepass-db |
repository | https://github.com/penguin359/keepass-db |
max_upload_size | |
id | 970885 |
size | 381,735 |
Read and write KeePass password databases. This should be able to read all known versions supported by the official KeePass software package and as well as a few variants only supported via extensions.
Write support is currently experimental.
To find and print a password based on website URL:
use keepass_db::{KeePassDoc, protected_stream::CipherValue, Key};
fn main() -> Result<(), Error> {
let mut key = Key::new();
key.set_user_password("secret");
let mut doc = KeePassDoc::load_file("passwords.kdbx", &key)?;
let database = doc.file;
let stream = &mut doc.cipher;
let basic_entry = database.root_group().all_entries().filter(|e| e.url().unprotect(stream).unwrap() == "https://www.example.com/").last().unwrap();
println!("Password: {}", basic_entry.password().unprotect(stream).unwrap());
Ok(())
}
Default features:
argonautica
: Default, well-tested Argon2 implementationOptional features:
rust-argon2
: Original Argon2 support. Not recommended. Must not be enabled with other Argon2 features.argon2-kdf
: Original C implementation of Argon2. Must not be enabled with other Argon2 features.write
: Experimental: Enable write support for KeePass database.The Minimum Supported Rust Version (MSRV) is currently Rust 1.70.0.
The MSRV is explicitly tested in CI. It may be bumped in minor releases, but this is not done lightly.
This project is licensed under