| Crates.io | passay-rs |
| lib.rs | passay-rs |
| version | 0.1.0 |
| created_at | 2025-12-19 19:20:37.339502+00 |
| updated_at | 2025-12-19 19:20:37.339502+00 |
| description | A password validation library inspired by the Java Passay library. |
| homepage | |
| repository | https://github.com/mojtab23/passay-rs |
| max_upload_size | |
| id | 1995346 |
| size | 7,481,022 |
passay-rs is a Rust library that provides password validation rules, inspired by the original Java library passay. It allows developers to enforce complex password policies such as minimum length, character composition, and exclusion of common words.
To use passay-rs, add it to your Cargo.toml:
[dependencies]
passay-rs = "0.1.0"
Then, create and configure your password validation rules:
use passay_rs::rule::PasswordData;
use passay_rs::rule::Rule;
use passay_rs::rule::length::LengthRule;
fn main() {
let rule = LengthRule::new(8, 20);
let password_data = PasswordData::with_password("SecureP@ssw0rd".to_string());
let result = rule.validate(&password_data);
assert!(result.valid());
}
We welcome contributions! If you're interested in helping with the project, please refer to the CONTRIBUTING.md file for more information.
This project is licensed under your choice of either the MIT License or the Apache License 2.0.
See LICENSE-MIT and LICENSE-APACHE for details.
This project is in early stages of development and there might be bugs and missing documentation. It's not recommended to be used in production.