Struct qwerty::Qwerty[][src]

pub struct Qwerty { /* fields omitted */ }

A password generator. Once Qwerty has been initialized with the desired password properties the terminal function generate can be called to get a password.

Examples

use qwerty::{Qwerty, Distribution};
let password = Qwerty::new(Distribution::Alphanumeric, 32).generate();

Methods

impl Qwerty
[src]

Create a new Qwerty password generator.

Examples

The following will create a password generator that uses the Ascii uniform distribution over the ASCII charachters, numbers, and symbols. It also sets the password length to be

  1. Once the terminal function generate() is called it will return a password with these properties.
use qwerty::{Qwerty, Distribution};

let ascii_password_generator = Qwerty::new(Distribution::Ascii, 25);
let password = ascii_password_generator.generate();
println!("{}", password);

Generate a password.

Examples

The following will generate a password using the EFF diceware long word list that is 8 words long.

use qwerty::{Qwerty, Distribution};

let password = Qwerty::new(Distribution::EffDiceware, 8).generate();
println!("{}", password);

Auto Trait Implementations

impl Send for Qwerty

impl Sync for Qwerty