3 releases

0.1.2 May 30, 2023
0.1.1 May 30, 2023
0.1.0 May 30, 2023

#743 in Authentication

Download history 108/week @ 2024-02-22 34/week @ 2024-02-29 7/week @ 2024-03-07 4/week @ 2024-03-14

129 downloads per month

Apache-2.0

15KB
341 lines

pw-gen - Password Generator

Password Generator Rust Library

Required password length is passed into new, while the special, numerical, lower and upper case calls have an optional required setting, assuring the generated password contains at least 1 character from each set.

Example

fn main() { let password = Generator::new(10)
.with_special(Some(true))
.with_numbers(Some(true))
.with_lowercase(Some(true))
.with_uppercase(Some(true))
.without_similar()
.without_ambiguous() .without_sequential() .generate(); println!("{}",password); }

Known Issue

0.1.0 has no checks on length so requiring all 4 and setting too short a password will cause the method to loop indefinitely.

0.1.1 no sequential support is missing.

Dependencies

~5.5–7.5MB
~129K SLoC