aalaap/hashapass
Composer 安装命令:
composer require aalaap/hashapass
包简介
A hashed password generator, returning passwords identical to Hashapass.com.
关键字:
README 文档
README
Hashapass is a library that generates unique and secure passwords, which are a hashed combination of a master password and a variable parameter.
The algorithm is based on a Base64 encode of the HMAC_SHA1 of the provided master password and parameter values.
Simple Usage
use Aalaap\Hashapass\Hashapass;
$hashapass = new Hashapass();
echo $hashapass->generate('master', 'parameter');
Motivation
I use Hashapass extensively to generate unique passwords for all my accounts. I need it at different places, so I've made a JavaScript bookmarklet, a Windows app and, now, a PHP package.
Installation
Install using Composer.
composer require aalaap/Hashapass
Advanced Usage
The package has one main method:
$hashapass->generate($master_password, $parameter);
By default, it will return a Hashapass-compatible 8-character password. To get a more secure 16-character password (or longer), simply specify the length:
$hashapass->generate($master_password, $parameter, 16);
Note that the maximum possible length is 40, as the algoritm is limited to the length of the generated HMAC_SHA1.
Tests
Hashapass has been tested in PHP 5.4 through PHP 7 and HHVM. If you want to run the tests, run:
vendor/bin/phpunit
Contributors
Fork it, work on it, send a PR.
License
Hashapass is licensed under WTFPL. Do whatever you want with it.
aalaap/hashapass 适用场景与选型建议
aalaap/hashapass 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 47 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 06 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「hashapass」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 aalaap/hashapass 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aalaap/hashapass 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: WTFPL
- 更新时间: 2016-06-01