pwg

Crates.iopwg
lib.rspwg
version0.1.1
sourcesrc
created_at2019-04-06 16:57:13.599527
updated_at2019-04-14 12:24:26.281768
descriptionWith 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.
homepagehttps://crates.io/crates/pwg
repositoryhttps://github.com/dirkeinecke/pwg
max_upload_size
id126189
size9,377
Dirk Einecke (dirkeinecke)

documentation

https://docs.rs/pwg/0.1.1/pwg/

README

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.

Commit count: 9

cargo fmt