libpassgen

Crates.iolibpassgen
lib.rslibpassgen
version1.0.3
sourcesrc
created_at2022-04-03 03:19:22.063867
updated_at2022-04-03 11:47:12.745497
descriptionLibrary for generating passwords
homepagehttps://github.com/Antidote1911/libpassgen
repositoryhttps://github.com/Antidote1911/libpassgen
max_upload_size
id561166
size31,101
Antidote1911 (Antidote1911)

documentation

README

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" :

use libpassgen::*;

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

Generate 100 passwords with 15 chars with the given "pool" :

use std::str::FromStr;
use libpassgen::*;

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

Have a look to Passgen cli app for full example.

Commit count: 13

cargo fmt