Crates.io Crates.io License License made-with-rust Build Status

libpassgen

Crate to generate pseudo-random passwords.
This is the Passgen core. A cli app to generate passwords.

USAGE

Generate a 15 chars password with the given "pool" : ```rust use libpassgen::*;

fn main() { let mut pool = Pool::new(); pool.extendfromstring("123456789"); let password = generate_password(&pool, 15); println!("{}",password); }

```

Generate 100 passwords with 15 chars with the given "pool" : ```rust use std::str::FromStr; use libpassgen::*;

fn main() { let mut pool = Pool::fromstr("1234567").unwrap(); let vecpasswords = generatenpasswords(&pool, 15, 100); for n in 0..vecpasswords.len() { println!("{}",vecpasswords[n]); } } ```

Have a look to Passgen cli app for full example.