pwg 0.1.1

With pwg you can easily create random passwords. You can specify how long the password should be and whether it should also contain capital letters, numbers and special characters.
Documentation

pwg

Build Status Crate Crates.io (Downloads) API License Gitter

With pwg you can easily create random passwords. You can specify how long the password should be and whether it should also contain capital letters, numbers and special characters.

Usage

Add this to your Cargo.toml:

[dependencies]
pwg = "0.1"

Add this to your *.rs file:

extern crate pwg;

Now you can proceed as follows:

Example 1

/*
  A password with 20 characters is generated.
  It contains lowercase letters (default),
  uppercase letters, numbers and symbols.
*/
let password = pwg::new(20, &["uppercase", "numbers", "symbols"]);
println!("{}", password);

Example 2

/* A password with 10 characters (lower case letters) is generated. */
let password = pwg::new(10, &[]);
println!("{}", password);

Example 3

/*
  A password with 20 characters is generated.
  It contains lowercase letters (default) and uppercase letters.
*/
let password = pwg::new(20, &["uppercase"]);
println!("{}", password);

Example 4

/*
  A password with 20 characters is generated.
  It contains lowercase letters (default) and numbers.
*/
let password = pwg::new(20, &["numbers"]);
println!("{}", password);

Example 5

/*
  A password with 20 characters is generated.
  It contains lowercase letters (default) and symbols.
*/
let password = pwg::new(20, &["symbols"]);
println!("{}", password);

Versions

A detailed changelog is available.

Getting help

If you have questions or problems with pwg, then we are happy to respond to GitHub issues or come chat with us on our Gitter channel - if you have any questions about the project, or just want to say hi!

License

pwg is distributed under the terms of the MIT license.

See LICENSE for details.