2 releases
new 0.1.1 | Apr 9, 2025 |
---|---|
0.1.0 | Apr 9, 2025 |
#532 in Cryptography
156 downloads per month
195KB
343 lines
Rust library for generating secure and customizable passwords. With support for various character sets and lengths, it helps you create strong and random passwords for any use case, ensuring high security for your applications.
🧩 Installation
Add the following to your Cargo.toml
file:
[dependencies]
vaultkey = {version = "*"}
📖 Usage
Generate a random password
use vaultkey::PasswordBuilder;
fn main() {
for i in 0..10 {
let password = PasswordBuilder::default()
.length(50)
.with_uppercase(true)
.min_digits(2)
.min_specials(2)
.avoid_ambiguous(true)
.build()
.unwrap();
println!("Generated password {}: {}", i + 1, password);
}
}
Output:
Generated password 1: Y*4M>{e/>rDh:j=?K[]@9E#s|L&@k=BSpq9L+r@*RK_u>D;a-5
Generated password 2: 6.8CRjvc%4?JB[#$f3qmkX8dB@jC{|$-}4Ruh%+j|q)$raBv}Y
Generated password 3: qWTo%{^8,=bYQ]y3{3=xV869_Dy67%q7wbq!-xR.gv,eF]f>E}
Generated password 4: b?}..{=ued2axY@FHFcBr|]%{b{r*@2RErJKVK((.34v{(?e!2
Generated password 5: rF8n%ia%?8K4]52.gD86K,<$fH&%yg77;P?_#+G9JAtr::GWLp
Generated password 6: v#ZY>#tH[ufX+=4eYYX}$sQ<=3-8([j%f<dJdXadyc]3E,yB!8
Generated password 7: SWcAy%WsE#d]bZj2#!$5cffw&-@!9n_{83wEmu]/P:#>;wV_5j
Generated password 8: 63#wX=vVStBY?_:+S-|_mt6.u;/n+}|S+Qvetp95PCG|st&;2t
Generated password 9: YryFs}(!9Nq#?-$z!<huF8$8=ufg4m<QWZTaNMLr)n4>5sm/)]
Generated password 10: bM+HQ!t[s2b)8q%6R|&Sa-4m9/T_[=imjDEZr>a&&gnN_-iRqQ
See all examples in the examples
folder.
🤝 Contributing
Contributions are what make the open source community an amazing place to learn, be inspired, and create. Any contributions you make are greatly appreciated.
- Fork the repository
- Clone your fork
git clone https://github.com/t1ltxz-gxd/vaultkey.git
- Create your feature branch
git checkout -b feat-smth-amazing
- Stage changes
git add .
- Commit your changes
git commit -m 'feat: add some amazing feature'
- Use Conventional Commits for commit messages.
- Use
fix
,feat
,docs
,style
,refactor
,perf
,test
,chore
prefixes. - Use the present tense ("add feature" not "added feature").
- Use the imperative mood ("move cursor to..." not "moves cursor to...").
- Limit the first line to 72 characters or less.
- Reference issues and pull requests liberally after the first line.
- Push to the branch
git push origin feat-smth-amazing
- Submit a pull request
❤️ Credits
Released with ❤️ by Tilt.
Dependencies
~1.4–2MB
~33K SLoC