passwordkit 0.1.0

generate passwords and validate requirements
Documentation
  • Coverage
  • 0%
    0 out of 20 items documented0 out of 0 items with examples
  • Size
  • Source code size: 29.9 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.4 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 31s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • MatthiasSchild/passwordkit
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • MatthiasSchild

passwordkit

This Rust library is a tiny tool kit for working with passwords.

Generate passwords

To generate a password, you can use the generate function. You need to enter the desired password length and options to the function. The options specifies how the result should look like.

fn main() {
    let result = passwordkit::generate(
        12,
        Options {
            min_lower_case: Some(2),
            min_upper_case: Some(2),
            min_digits: Some(2),
            min_special_chars: Some(2),
            ..Default::default()
        },
    );

    let password = match result {
        Ok(password) => password,
        Err(err) => panic!("Failed to generate: {:?}", err),
    };
}

Check password security