FerroPassGen
ferropassgen is a Rust library for generating strong and secure passwords and
passphrases. It provides a flexible and customizable password generation
framework that can be easily integrated into other Rust projects.
Features
- Generate strong passwords with customizable length and character sets
- Generate memorable passphrases with customizable length, word list, separator, and word case
- Lightweight and fast password generation
- Extensible and customizable password generation traits
- Well-documented API with examples and error handling
Usage
To use ferropassgen in your Rust project, add the following to your
Cargo.toml:
[]
= "0.1.0"
Then, import the necessary modules and structs in your Rust code:
use ;
Generating Passwords
To generate a password, create an instance of PasswordGen and call the
generate method:
let length = 16;
let charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*".chars.;
let password_gen = new?;
let password = password_gen.generate;
Generating Passphrases
To generate a passphrase, create an instance of PassphraseGen and call the
generate method:
let length = 4;
let wordlist = vec!
.iter
.map
.;
let separator = Some;
let word_case = Some;
let passphrase_gen = new?;
let passphrase = passphrase_gen.generate;
Error Handling
The new methods of PasswordGen and PassphraseGen return a
Result<Self, PassGenError>. Make sure to handle the potential errors
appropriately.
Examples
Here are a few examples of using ferropassgen to generate passwords and
passphrases:
use ;
API Documentation
For detailed information about the ferropassgen API, including structs,
traits, and methods, please refer to the
API documentation.
License
This project is licensed under the GNU Lesser General Public License v3.0.
Acknowledgements
ferropassgen was inspired by the need for a flexible and customizable password
generation library in Rust. It builds upon the excellent work of the Rust
community and the libraries they have created.
Special thanks to the developers of the following libraries: