1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//! Password Management Module
//!
//! This module provides secure password hashing and verification functionality for authentication systems.
//! It exposes password management strategies and utilities, including Argon2-based password hashing.
//!
//! # Modules
//!
//! - [`argon2`]: Contains the Argon2 password hashing implementation and configuration.
//! - [`manager`]: Defines the `SecurePasswordManager` trait and related password management logic.
//!
//! # Re-exports
//!
//! - [`Argon2PasswordManager`]: A concrete password manager using Argon2 for hashing and verification.
//! - [`SecurePasswordManager`]: The main trait for password management operations.
//!
//! # Example
//!
//! ```rust
//! use authen::core::password::{Argon2PasswordManager, SecurePasswordManager};
//!
//! let manager = Argon2PasswordManager::default();
//! let password = "mysecret";
//! let hash = manager.hash_password(password)?;
//! assert!(manager.verify_password(password, &hash)?);
//! ```
//!
//! # Security
//!
//! Always use a secure, up-to-date password hashing algorithm such as Argon2. Never store plain-text passwords.
//! This module is designed to make it easy to follow best practices for password security.
/// Re-export of the Argon2-based password manager implementation.
pub use Argon2PasswordManager;
/// Re-export of the main password management trait.
pub use SecurePasswordManager;