keepass 0.13.13

KeePass .kdbx database file parser
Documentation
[package]
name = "keepass"
description = "KeePass .kdbx database file parser"
keywords = ["keepass", "kdbx", "kdb", "password"]
categories = ["parser-implementations", "security"]

edition = "2018"
rust-version = "1.85.1"

homepage = "https://github.com/sseemayer/keepass-rs"
repository = "https://github.com/sseemayer/keepass-rs"
documentation = "https://docs.rs/keepass"

version = "0.13.13"
authors = ["Stefan Seemayer <stefan@seemayer.de>"]
license = "MIT"

readme = "README.md"

include = [
  "src/",
  "README.md",
  "LICENSE",
]

[features]
utilities = ["anyhow", "clap", "rpassword", "serialization", "totp"]
serialization = ["serde_json", "chrono/serde"]
totp = ["totp-lite", "url", "base32"]
save_kdbx4 = []
challenge_response = ["sha1", "dep:challenge_response"]
_merge = []

default = []

[dependencies]
thiserror = "2"

# encoding and parsing
byteorder = "1"
flate2 = "1"
base64 = "0.22"
serde = { version = "1",  features = ["derive"] }
quick-xml = { version = "0.41", features = ["serialize"] }
hex-literal = "1"
secrecy = "0.10.3"
chrono = { version = "0.4.23", default-features = false, features = [
    "serde",
    "clock",
    "std",
] }

# cryptography
rust-argon2 = "3.0"
sha1 = { version = "0.11", optional = true }
sha2 = "0.11"
aes = "0.9"
block-modes = "0.9"
hmac = "0.13"
salsa20 = "0.11"
chacha20 = "0.10"
cipher = { version = "0.5", features = ["block-padding", "alloc"] }
twofish = "0.8"
cbc = "0.2"

challenge_response = { version = "0.5", optional = true, default-features = false, features = ["nusb"] }

uuid = { version = "1.18.1", features = ["v4", "serde"] }
hex = { version = "0.4" }
hybrid-array = "0.4"
getrandom = { version = "0.4", features = ["std"] }
zeroize = { version = "1", features = ["zeroize_derive"] }

# dependencies for command-line utilities
anyhow = { version = "1", optional = true }
clap = { version = "4", optional = true, features = ["derive"] }
rpassword = { version = "7", optional = true }

# dependencies for serialization (enabled by "serialization" feature)
serde_json = { version = "1", optional = true }

# dependencies for totp (enabled by "totp" feature)
totp-lite = { version = "2.0", optional = true }
url = { version = "2.2", optional = true }
base32 = { version = "0.5", optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
# rustfmt is only needed for native targets; compiling it (and its syntex_*) for
# wasm32 causes build failures, so we keep it as a dev-dependency but exclude it
# on wasm.
rustfmt = "0.10"
tempfile = "3"
rand = "0.8"
test-with = { version = "0.16", default-features = false, features = ["executable"] }

# Browser-only deps: wasm32-unknown-unknown is the canonical browser target.
# wasi-flavoured wasm32 targets (wasm32-wasip1, wasm32-wasip2) use their own
# backends in getrandom/uuid and cannot resolve js-sys' wasm-bindgen
# placeholder imports, so they must NOT pull these in.
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
js-sys = "0.3"
# For wasm32-unknown-unknown, use the JS backend of getrandom. This mirrors the
# configuration used in the database crate and ensures that random bytes work
# correctly in WebAssembly environments.
getrandom = { version = "0.4", features = ["wasm_js"] }
uuid = { version = "1.18.1", features = ["js"] }

[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies]
wasm-bindgen-test = "0.3"

[[bin]]
# parse a KeePass database and output as a JSON document
name = "kp-dump-json"
required-features = ["utilities"]

[[bin]]
# decrypt a KeePass database and output the inner XML document
name = "kp-dump-xml"
required-features = ["utilities"]

[[bin]]
# Purge the history items in the Database entries
name = "kp-purge-history"
required-features = ["utilities", "save_kdbx4"]

[[bin]]
# decrypt a KeePass database and show the contained data
name = "kp-show-db"
required-features = ["utilities"]

[[bin]]
# decrypt a KeePass database and show the TOTP value for an entry
name = "kp-show-otp"
required-features = ["utilities"]

[[bin]]
# get the version of a KeePass database file
name = "kp-get-version"
required-features = ["utilities"]

[[bin]]
# parse and write a KeePass database (to check if all fields are kept)
name = "kp-rewrite"
required-features = ["utilities", "save_kdbx4"]

[[bin]]
name = "kp-yk-add"
required-features = ["utilities", "save_kdbx4", "challenge_response"]

[[bin]]
name = "kp-yk-remove"
required-features = ["utilities", "save_kdbx4", "challenge_response"]

[[bin]]
name = "kp-yk-recover"
required-features = ["utilities", "save_kdbx4", "challenge_response"]

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin_include)'] }
missing_docs = "warn"
rust_2018_idioms = "warn"

[lints.clippy]
indexing_slicing = "deny"
missing_panics_doc = "deny"
unwrap_used = "deny"
expect_used = "deny"
cast_lossless = "deny"
cargo = { level = "warn", priority = -1 }

[[example]]
name = "save_database"
required-features = ["save_kdbx4"]

[[example]]
name = "merge_databases"
required-features = ["_merge"]