Crates.io | passg-lib |
lib.rs | passg-lib |
version | 0.1.0 |
source | src |
created_at | 2021-09-07 22:23:07.645924 |
updated_at | 2021-09-07 22:23:07.645924 |
description | Generate pseudo-random passwords |
homepage | |
repository | https://github.com/xgillard/passg |
max_upload_size | |
id | 448257 |
size | 10,957 |
PassGen is a simple crate to help you to pseudo-random passwords matching a desired set of (simple constraints)
The crate's documentation gives an example on how to generate a random password. Basically, you will want to do something along these lines:
use passg::prelude::*;
let generator = GeneratorBuilder::default()
.alpha(Alpha::Dist) // this is the default
.digit(Digit::Dist) // this is the default
.special(Special::Basic) // this is the default
.build()
.expect("This is never going to fail")