aescrypt_rs/lib.rs
1#![doc = include_str!("../README.md")]
2
3pub mod aliases;
4pub mod constants;
5pub mod decryption;
6pub mod encryption;
7pub mod error;
8pub mod header;
9pub mod kdf;
10pub mod pbkdf2_builder;
11pub mod utilities;
12
13// High-level API — this is what 99% of users import
14pub use aliases::PasswordString;
15pub use decryption::decrypt;
16pub use encryption::encrypt;
17pub use error::AescryptError; // Core type used in every encrypt/decrypt call
18
19// Low-level KDFs — intentionally public at the root because:
20// • They are needed for custom decryption flows (e (e.g. reading v0–v2 files without the high-level API)
21// • They are the only non-wrapper crypto functions users ever need directly
22// • Keeping them at the root is the established pattern in the ecosystem (see `ring`, `password-hash`, etc.)
23pub use pbkdf2_builder::Pbkdf2Builder;
24
25pub use kdf::ackdf::derive_ackdf_key;
26pub use kdf::pbkdf2::derive_pbkdf2_key;
27
28pub use header::read_version; // New: Quick version check