hautelook/phpass
最新稳定版本:0.3.6
Composer 安装命令:
composer require hautelook/phpass
包简介
Portable PHP password hashing framework
README 文档
README
This repository is a fork from the original hautelook/phpass which seems to have been deleted on 2021-09-09.
Openwall Phpass, modernized
This is Openwall's Phpass, based on the 0.3 release, but modernized slightly:
- Namespaced
- Composer support (Autoloading)
- PHP 5 style
- Unit Tested
The changes are minimal and only stylistic. The source code is in the public domain. We claim no ownership, but needed it for one of our projects, and wanted to make it available to other people as well.
Installation
Add this requirement to your composer.json file and run composer.phar install:
{
"require": {
"bordoni/phpass": "dev-main"
}
}
Usage
The following example shows how to hash a password (to then store the hash in the database), and how to check whether a provided password is correct (hashes to the same value):
<?php namespace Your\Namespace; use Hautelook\Phpass\PasswordHash; require_once(__DIR__ . "/vendor/autoload.php"); $passwordHasher = new PasswordHash(8,false); $password = $passwordHasher->HashPassword('secret'); var_dump($password); $passwordMatch = $passwordHasher->CheckPassword('secret', "$2a$08$0RK6Yw6j9kSIXrrEOc3dwuDPQuT78HgR0S3/ghOFDEpOGpOkARoSu"); var_dump($passwordMatch);
hautelook/phpass 适用场景与选型建议
hautelook/phpass 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.58M 次下载、GitHub Stars 达 15, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「security」 「password」 「crypt」 「blowfish」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 hautelook/phpass 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 hautelook/phpass 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 hautelook/phpass 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Composer friendly version of http://web.archive.org/web/20130727034425/http://blog.kevburnsjr.com/php-unique-hash
The PHP class PasswordGenerator serves as a password generator to create memorable passwords like the keychain of macOS ≤ 10.14 did.
Provide a way to secure accesses to all routes of an symfony application.
Strong cryptography tools and password hashing
This symfony user provider reads user from the htpasswd file.
Portable PHP password hashing framework
统计信息
- 总下载量: 2.58M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 26
- 点击次数: 25
- 依赖项目数: 27
- 推荐数: 2
其他信息
- 授权协议: Public
- 更新时间: 未知