Crates.io | pwg |
lib.rs | pwg |
version | 0.1.1 |
source | src |
created_at | 2019-04-06 16:57:13.599527 |
updated_at | 2019-04-14 12:24:26.281768 |
description | 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. |
homepage | https://crates.io/crates/pwg |
repository | https://github.com/dirkeinecke/pwg |
max_upload_size | |
id | 126189 |
size | 9,377 |
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.
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:
/*
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);
/* A password with 10 characters (lower case letters) is generated. */
let password = pwg::new(10, &[]);
println!("{}", password);
/*
A password with 20 characters is generated.
It contains lowercase letters (default) and uppercase letters.
*/
let password = pwg::new(20, &["uppercase"]);
println!("{}", password);
/*
A password with 20 characters is generated.
It contains lowercase letters (default) and numbers.
*/
let password = pwg::new(20, &["numbers"]);
println!("{}", password);
/*
A password with 20 characters is generated.
It contains lowercase letters (default) and symbols.
*/
let password = pwg::new(20, &["symbols"]);
println!("{}", password);
A detailed changelog is available.
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!
pwg
is distributed under the terms of the MIT license.
See LICENSE for details.