aescrypt_rs/
lib.rs

1// src/lib.rs
2
3pub mod aliases;
4pub mod consts;
5pub mod convert;
6pub mod crypto;
7pub mod decryptor;
8pub mod encryptor;
9pub mod error;
10pub mod utils;
11
12#[cfg(feature = "batch-ops")]
13pub mod batch_ops;
14
15// High-level API — this is what 99% of users import
16pub use decryptor::decrypt;
17pub use encryptor::encrypt;
18pub use error::AescryptError;
19
20// Low-level KDFs — intentionally public at the root because:
21// • They are needed for custom decryption flows (e (e.g. reading v0–v2 files without the high-level API)
22// • They are the only non-wrapper crypto functions users ever need directly
23// • Keeping them at the root is the established pattern in the ecosystem (see `ring`, `password-hash`, etc.)
24pub use crypto::kdf::ackdf::derive_secure_ackdf_key;
25pub use crypto::kdf::pbkdf2::derive_secure_pbkdf2_key;
26pub use crypto::kdf::pbkdf2_builder::Pbkdf2Builder;
27
28#[cfg(feature = "batch-ops")]
29pub use batch_ops::{decrypt_batch, encrypt_batch};
30
31pub use convert::convert_to_v3;