#password-generator #cli-password #lib #length #porjects

bin+lib simple_password_generator

Simple CLI password generator. Can also be used as lib in other porjects

2 stable releases

1.0.1 Dec 14, 2022

#691 in Authentication

Download history 8/week @ 2024-02-22 5/week @ 2024-02-29 16/week @ 2024-03-07 111/week @ 2024-03-14

140 downloads per month

MIT license

17KB
218 lines

simple_password_generator

CLI

Running from the binary file

$ ./simple_password_generator --length 16
$ Password: D2sb9NV7@XjQQ&#

Available Flags

Short Long Description Default
--length Length of password 8
-u --ucase-only Only use uppercase aplha characters false
-l --lcase-only Only use lowercase aplha characters false
-n --no-numbers Don't include any number false
-s --no-special Dont include any special characters false
-h Help
-v version

Lib

use simple_password_generator::PasswordGenerator;

fn main() {
    let password = PasswordGenerator::new().length(password_length).generate();

    println!("Password: {}", password);
}

Dependencies

~1.5–2.1MB
~40K SLoC