Skip to main content

age_setup/
lib.rs

1//! # age-authenticator
2//!
3//! A secure authentication library built on the [age](https://age-encryption.org) encryption
4//! protocol. Provides key generation, validation, memory-safe secret storage, and persistent
5//! configuration management via [`neuxcfg`](https://crates.io/crates/neuxcfg).
6//!
7//! ## Quick Start
8//!
9//! ```no_run
10//! use age_setup::{build_keypair, init_config};
11//!
12//! // Initialize configuration store
13//! init_config()?;
14//!
15//! // Generate a new key pair
16//! let keypair = build_keypair()?;
17//! println!("Public key: {}", keypair.public);
18//! # Ok::<(), Box<dyn std::error::Error>>(())
19//! ```
20//!
21//! ## Modules
22//!
23//! | Module | Purpose |
24//! |--------|---------|
25//! | [`keypair`] | Key pair container with redacted debug |
26//! | [`public_key`] | Age public key wrapper with validation |
27//! | [`secret_key`] | Zeroizing secret key wrapper |
28//! | [`generator`] | Age X25519 identity generation |
29//! | [`validation`] | Prefix validation for age keys |
30//! | [`security`] | Memory wiping utilities |
31//! | [`config`] | Persistent configuration via neuxcfg |
32//! | [`errors`] | Structured error types |
33
34pub mod config;
35pub mod errors;
36pub mod generator;
37pub mod keypair;
38pub mod public_key;
39pub mod secret_key;
40pub mod security;
41pub mod validation;
42
43pub use config::init as init_config;
44pub use errors::{Error, GenerationError, Result, ValidationError};
45pub use generator::build_keypair;
46pub use keypair::KeyPair;
47pub use public_key::PublicKey;
48pub use secret_key::SecretKey;