Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/griffolion/pwned

A small, simple library for checking a password against the HaveIBeenPwned password checker API.
https://github.com/griffolion/pwned

api api-client haveibeenpwned password passwords php php-library php7 php8 php80 php81

Last synced: 1 day ago
JSON representation

A small, simple library for checking a password against the HaveIBeenPwned password checker API.

Awesome Lists containing this project

README

        

![PHPUnit](https://github.com/Griffolion/pwned/workflows/PHPUnit/badge.svg)

# HaveIBeenPwnedRangeChecker

A small, simple library for checking a password against the [HaveIBeenPwned password checker API](https://haveibeenpwned.com/API/v3#PwnedPasswords).

Passwords appearing in the search results of the API have appeared in breached databases, and thus any accounts using such a password are at greater risk of being breahced.

## Requirements

- PHP 7.1 or above
- Curl

## Installation

`composer require griffolion/pwned`

## Basic Usage

```php
use Pwned\Range;
...
$pwnedCount = (new Range())->check("password");
if ($pwnedCount > 0) {
echo "Your password is at risk!";
}
```