rs-password-utils

Crates.iors-password-utils
lib.rsrs-password-utils
version0.2.0
sourcesrc
created_at2020-06-12 12:15:04.485866
updated_at2023-10-25 10:59:01.217623
descriptionPassword utilities, writen in Rust
homepage
repositoryhttps://gitlab.com/astonbitecode/rs-password-utils
max_upload_size
id253246
size167,338
Volo-maintainers (github:cloudwego:volo-maintainers)

documentation

README

rs-password-utils

pipeline crates.io

This library contains password utilities and is written in Rust.

Currently it offers:

The check implementation leverages the k-anonimity API and therefore, the password is not used in the API calls in any form (not even hashed).

Usage

The utility can be used as a library, or as an executable:

Library

extern crate rs_password_utils;
use std::result::Result;

#[tokio::main]
async fn main() -> Result<(), rs_password_utils::PasswordUtilsError> {
    let is_pwned = rs_password_utils::pwned::is_pwned("test").await?;

    println!("The password is pwned: {}", is_pwned);

    Ok(())
}

Executable

Having rust installed, you may install rs-password-utils using cargo:

  • From crates.io: cargo install rs-password-utils --features executable

  • From gitlab: cargo install --git https://gitlab.com/astonbitecode/rs-password-utils.git --features executable

When the installation completes, issuing the following command:

rs-password-utils --help

should give you an output like:

Password utilities, written in Rust.
 
 Usage:
   rs-password-utils pwned
   rs-password-utils dice [(-w <count>)]
   rs-password-utils [-h]
 
 Options:
   -w --words    The amount of words that should comprise the passphrase
   -h --help     Show this screen.

License

At your option, under:

Commit count: 15

cargo fmt