2 个稳定版本
| 1.0.1 | 2022 年 12 月 14 日 |
|---|
#725 in 身份验证
17KB
218 行
simple_password_generator
CLI
从二进制文件运行
$ ./simple_password_generator --length 16
$ Password: D2sb9NV7@XjQQ&#
可用标志
| 短 | 长 | 描述 | 默认 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| --length | 密码长度 | 8 | |||||||
| -u | --ucase-only | 仅使用大写字母 | false | ||||||
| -l | --lcase-only | 仅使用小写字母 | false | ||||||
| -n | --no-numbers | 不包含数字 | false | ||||||
| -s | --no-special | 不包含特殊字符 | false | ||||||
| -h | 帮助 | ||||||||
| -v | 版本 | ||||||||
库
use simple_password_generator::PasswordGenerator;
fn main() {
let password = PasswordGenerator::new().length(password_length).generate();
println!("Password: {}", password);
}
依赖
~1.5–2.1MB
~39K SLoC