genp

Crates.iogenp
lib.rsgenp
version0.3.1
sourcesrc
created_at2019-11-16 05:57:36.100885
updated_at2019-11-16 06:33:07.924174
descriptionA library for generating passwords and passphrases.
homepage
repositoryhttps://github.com/joshua-cooper/genp
max_upload_size
id181722
size121,529
Josh Cooper (joshua-cooper)

documentation

README

genp

This crate provides functions for generating passwords from a character list or passphrases from a word list. Some character and word lists are exported by this crate to use when you don't want to supply your own.

Examples

Password

use genp::password;
use genp::charlist::{LOWERCASE, NUMBERS, UPPERCASE};

let len = 26;

let mut charlist = Vec::new();
charlist.extend_from_slice(&LOWERCASE);
charlist.extend_from_slice(&NUMBERS);
charlist.extend_from_slice(&UPPERCASE);

println!("{}", password(&charlist, len));

Passphrase

use genp::passphrase;
use genp::wordlist::ENGLISH;

let len = 12;

println!("{}", passphrase(&ENGLISH, len));
Commit count: 6

cargo fmt