passg-lib

Crates.iopassg-lib
lib.rspassg-lib
version0.1.0
sourcesrc
created_at2021-09-07 22:23:07.645924
updated_at2021-09-07 22:23:07.645924
descriptionGenerate pseudo-random passwords
homepage
repositoryhttps://github.com/xgillard/passg
max_upload_size
id448257
size10,957
Xavier Gillard (xgillard)

documentation

README

PassG-lib

PassGen is a simple crate to help you to pseudo-random passwords matching a desired set of (simple constraints)

Usage

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")
Commit count: 5

cargo fmt