1 unstable release

0.1.0 Sep 7, 2021

#19 in #random-password

25 downloads per month
Used in passg-tool

MIT license

11KB
238 lines

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

lib.rs:

This library provides a convenient way to generate pseudorandom passwords according to some given constraints.

Example

use passg::prelude::*;
let generator = GeneratorBuilder::default().build();
let password  = generator.generate();

Dependencies

~3.5MB
~64K SLoC