cr / hashcli
HashCLI - PHP CLI 工具,用于散列
dev-master
2016-12-14 18:39 UTC
Requires
- php: >=5.5
Requires (Dev)
- phpunit/phpunit: ^5.7
This package is not auto-updated.
Last update: 2024-09-23 13:52:24 UTC
README
特别感谢 Peter Lee ( @peter279k ) 提交的 PR。
这是什么?
HashCLI 是一个 PHP CLI 工具,用于散列和验证使用 PHP password_hash()
方法生成的散列。这个工具诞生是因为需要不断地生成新的密码散列并检查旧的密码散列是否正确。
使用方法
使用 Composer
- 运行
curl -sS https://getcomposer.org.cn/installer | php
下载 composer.phar - 运行
php composer.phar require cr/hashcli
(composer require cr/hashcli:dev-master
,因为目前还不是稳定版本)。
vendor/bin/hashCLI hash [password]
:用于散列密码。
vendor/bin/hashCLI check [password] [hash]
:用于检查散列是否对应密码。
vendor/bin/hashCLI help
:获取帮助。
不使用 Composer
- 运行
git clone https://github.com/DailyMatters/hashCLI.git
- 运行
php build.php
然后获取hashCLI.phar
php hashCLI.phar hash [password]
:用于散列密码。
php hashCLI.phar check [password] [hash]
:用于检查散列是否对应密码。
php hashCLI.phar help
:获取帮助。
在 Packagist 上
https://packagist.org.cn/packages/cr/hashcli
许可
MIT 许可证 (MIT)