1pub mod diceware;
5mod error;
6pub mod generator;
7mod memorable;
8
9pub use error::Error;
10pub use memorable::memorable_password;
11
12pub use zxcvbn;
13
14use secrecy::SecretString;
15
16pub fn memorable() -> SecretString {
20 SecretString::new(memorable_password(3).into())
21}
22
23pub(crate) type Result<T> = std::result::Result<T, Error>;
25
26#[doc(hidden)]
28pub const VOWELS: &[char] = &['a', 'e', 'i', 'o', 'u'];
29
30#[doc(hidden)]
32pub const CONSONANTS: &[char] = &[
33 'b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r',
34 's', 't', 'v', 'w', 'x', 'y', 'z',
35];
36
37#[doc(hidden)]
39pub const DIGITS: &[char] =
40 &['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];