Crates.io | simple-pass-gen |
lib.rs | simple-pass-gen |
version | 0.1.8 |
source | src |
created_at | 2023-05-21 09:12:06.171526 |
updated_at | 2023-05-21 09:56:16.77996 |
description | Simple-Pass-Gen is a password generator library. |
homepage | |
repository | |
max_upload_size | |
id | 869846 |
size | 6,728 |
Simple Pass Gen is a simple password generator library.
In order to use it first of all add simple-pass-gen to your Cargo.toml file:
simple-pass-gen = "0.1.8"
Then call one of two available functions:
pub fn generate_password(
password_length: i32,
include_upper_case: bool,
include_lower_case: bool,
include_numbers: bool,
include_symbols: bool,
) -> Result<String, SimplePassGenError>;
or if you want to generate a easy to remember password
pub fn generate_mnemonic_password(password_length: i32)
-> Result<String, SimplePassGenError>
use simple_pass_gen::generate_mnemonic_password;
use simple_pass_gen::generate_password;
fn main() {
let result = generate_mnemonic_password(5).unwrap();
println!("{}", result);
let result2 = generate_password(5, true, true, true, false).unwrap();
println!("{}", result2);
}
p.s. this is my first library on crates.io (: