ph-7/passcode-password-generator
Composer 安装命令:
composer require ph-7/passcode-password-generator
包简介
A simple way to generate random cryptographically secure passcodes and passwords
关键字:
README 文档
README
📄 Description
A simple, secure & clean way to generate random passcodes and passwords 🔑
The library generates cryptographically secure random passwords and passcodes.
🛠 Server Requirement
- PHP 7.3 and higher 🚀
🛠 Installation (with Composer)
composer require ph-7/passcode-password-generator
📄 Usage
For Passcodes
use PH7\Generator\Passcode; echo Passcode::generate(10); // Generate a 10-length passcode
By default, without argument, the function will generate a 6-character passcode.
use PH7\Generator\Passcode; // By default, it generates a 6 length passcode echo Passcode::generate(); // You can use the public `Passcode::DEFAULT_LENGTH` const, whcih also gives a 6-length passcode echo Passcode::generate(Passcode::DEFAULT_LENGTH);
For Passwords
use PH7\Generator\Password; echo Password::generate(16); // Generate a 16-length password
By default, generated passwords will contain special characters. You can disable them by mentioning the second argument to false
use PH7\Generator\Password; // The password won't contain any special characters such as -, _, ~, |, %, ^, !, $, #, @, and ? echo Password::generate(Password::DEFAULT_LENGTH, false);
Without argument, the function will generate a 12-character password.
use PH7\Generator\Password; // By default, it generates a 12-length password echo Password::generate(); // Password::DEFAULT_LENGTH also gives a 12-length password echo Password::generate(Password::DEFAULT_LENGTH);
😋 Who cooked it?
Pierre-Henry Soria, a highly passionate, zen & pragmatic software engineer 😊
☕️ Would like to help? Offer me a coffee, and boost the maintenance of this library! 💪
⚖️ License
PHP Passcode/Password Generator is generously distributed under the MIT 🎉
ph-7/passcode-password-generator 适用场景与选型建议
ph-7/passcode-password-generator 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 26.63k 次下载、GitHub Stars 达 12, 最近一次更新时间为 2021 年 09 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「generator」 「security」 「cryptography」 「password」 「password generator」 「digit」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ph-7/passcode-password-generator 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ph-7/passcode-password-generator 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ph-7/passcode-password-generator 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
DUKPT implementation in PHP
Provide a way to secure accesses to all routes of an symfony application.
A library for reading KeePass 2.x databases
It's a barebone security class written on PHP
Laravel authentication middleware for UZI passes.
统计信息
- 总下载量: 26.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 37
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-09-29
