codlet-core 0.11.0

Core authentication primitives for codlet: code policy, generation, normalization, keyed lookup derivation, lifecycle state machines, and storage traits.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! One-time code policy, generation, normalization, and validation (RFC-003).
//!
//! The four representations of a code are kept distinct (RFC-003 ยง11.2):
//! generated plaintext and user input are [`crate::secret::PlainCode`] /
//! normalized `String` (secret, never persisted); the persisted value is a
//! [`crate::hashing::LookupKey`] derived in the [`crate::hashing`] module.

pub mod alphabet;
pub mod generate;
pub mod normalize;
pub mod policy;

pub use alphabet::{Alphabet, DEFAULT_ALPHABET};
pub use generate::{generate_code, validate_code_input};
pub use normalize::normalize;
pub use policy::{CodePolicy, DEFAULT_MAX_RAW_LEN, LEGACY_CIAO_LENGTH, SECURE_MIN_HUMAN_LENGTH};