Skip to main content

Module password

Module password 

Source
Expand description

Password hashing utilities for secure credential storage.

Provides a simple, safe API for hashing and verifying passwords with configurable algorithms and work factors.

§Example

use fastapi_core::password::{PasswordHasher, HashConfig, Algorithm};

let hasher = PasswordHasher::new(HashConfig::default());
let hash = hasher.hash_password("secret123");
assert!(hasher.verify_password("secret123", &hash));
assert!(!hasher.verify_password("wrong", &hash));

Structs§

HashConfig
Configuration for password hashing.
PasswordHasher
Password hasher with configurable algorithm and work factors.

Enums§

Algorithm
Supported hashing algorithms.