Crates.io | genp |
lib.rs | genp |
version | 0.3.1 |
source | src |
created_at | 2019-11-16 05:57:36.100885 |
updated_at | 2019-11-16 06:33:07.924174 |
description | A library for generating passwords and passphrases. |
homepage | |
repository | https://github.com/joshua-cooper/genp |
max_upload_size | |
id | 181722 |
size | 121,529 |
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.
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));
use genp::passphrase;
use genp::wordlist::ENGLISH;
let len = 12;
println!("{}", passphrase(&ENGLISH, len));