PHPackages                             unique/was-password-pwned - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. unique/was-password-pwned

ActiveLibrary[Security](/categories/security)

unique/was-password-pwned
=========================

A small tool to check if a password has been leaked against haveibeenpwned.com database.

131PHP

Since Feb 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/uniquexor/was-password-pwned)[ Packagist](https://packagist.org/packages/unique/was-password-pwned)[ RSS](/packages/unique-was-password-pwned/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Events
======

[](#events)

A small tool to check if a password has been leaked against haveibeenpwned.com database.

Installation
------------

[](#installation)

This component requires php &gt;= 7.4. To install it, you can use composer:

```
composer require unique/was-password-pwned

```

Usage
-----

[](#usage)

```
    $checker = new PasswordChecker();
    $count = $checker->checkIfPasswordPwned( sha1( 'my-password' ) );
    if ( $count ) {

        echo 'Your password has been leaked and found in ' . $count . ' databases.';
    } elseif ( $count === null ) {

        if ( $checker->getLastException() ) {

            echo (string) $checker->getLastException();
        } else {

            echo 'An error has occured.';
        }
    }
```

haveibeenpwned.com usage and license
------------------------------------

[](#haveibeenpwnedcom-usage-and-license)

Please read  for acceptable use of haveibeenpwned.com service and attribute it according to the author: .

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/48786540?v=4)[Unique (Deutschland) GmbH](/maintainers/unique)[@unique](https://github.com/unique)

---

Top Contributors

[![uniquexor](https://avatars.githubusercontent.com/u/6176836?v=4)](https://github.com/uniquexor "uniquexor (2 commits)")

### Embed Badge

![Health badge](/badges/unique-was-password-pwned/health.svg)

```
[![Health](https://phpackages.com/badges/unique-was-password-pwned/health.svg)](https://phpackages.com/packages/unique-was-password-pwned)
```

###  Alternatives

[phpids/phpids

PHPIDS (PHP-Intrusion Detection System) is a simple to use, well structured, fast and state-of-the-art security layer for your PHP based web application

791150.0k2](/packages/phpids-phpids)[paragonie/ecc

PHP Elliptic Curve Cryptography library

25866.3k44](/packages/paragonie-ecc)[sansec/magento2-module-shield

15218.6k](/packages/sansec-magento2-module-shield)[nicobleiler/php-passphrase

Passphrase generator with Laravel integration, inspired by Bitwarden. Uses the EFF long word list by default with support for custom wordlists.

4912.6k](/packages/nicobleiler-php-passphrase)[dwgebler/encryption

Encryption wrapper for PHP using libsodium — simple API for symmetric and asymmetric encryption, password hashing, digital signing, and message authentication.

317.5k](/packages/dwgebler-encryption)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
