passay-rs
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.
Features
- Validate passwords against a set of rules
- Support for various rule types such as:
- Minimum and maximum length
- Character composition (uppercase, lowercase, digits, special characters)
- Exclusion of common words
- Check for username or password reuse
- Whitespace detection
- Source reference matching
- Customizable rule behavior (e.g., case sensitivity, backwards matching)
- Extensible architecture to support additional rules and languages
Usage
To use passay-rs, add it to your Cargo.toml:
[]
= "0.1.0"
Then, create and configure your password validation rules:
use PasswordData;
use Rule;
use LengthRule;
Contributing
We welcome contributions! If you're interested in helping with the project, please refer to the CONTRIBUTING.md file for more information.
License
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.
Notes
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.