snipershady/pwned-password-check
最新稳定版本:v1.0.0
Composer 安装命令:
composer require snipershady/pwned-password-check
包简介
Easy to use PHP Implementation of the free API haveibeenpwned.com
README 文档
README
Easy to use PHP Implementation of the free API haveibeenpwned.com
composer require snipershady/pwned-password-check
Context
You want to check if a password was already been pwned (same password has been hacked from another website) and then if it is safe to be used. This check could be used as a service during a registration form, for example, maybe with an async call, as you prefer.
use PwnedPassCheck\Service\PwnedPasswordCheckerService; class fooClass(){ public function checkIfPasswordHasBeenPowned(): string { $pownedPassChecker = new PwnedPasswordCheckerService(); if(pownedPassChecker->hasPowned($password)){ return json_encode(["powned" => true, "msg"=> "Your password has been powned and is unsafe"]); } return return json_encode(["powned" => false, "msg"=> "Your password was not been powned"]); } }
统计信息
- 总下载量: 333
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2022-09-30