定制 snipershady/pwned-password-check 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2022-09-30