PHPackages                             esolitos/pwnedpasswords - 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. esolitos/pwnedpasswords

ActiveLibrary

esolitos/pwnedpasswords
=======================

Generic service to query Troy's pwnedpasswords.com service.

1.0.2(7mo ago)880.7k↓28.7%1[1 issues](https://github.com/esolitos/pwnedpasswords/issues)[2 PRs](https://github.com/esolitos/pwnedpasswords/pulls)MITPHP

Since Feb 25Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/esolitos/pwnedpasswords)[ Packagist](https://packagist.org/packages/esolitos/pwnedpasswords)[ RSS](/packages/esolitos-pwnedpasswords/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (8)Used By (0)

`esolitos/pwnedpasswords`: Check how broken is your password
============================================================

[](#esolitospwnedpasswords-check-how-broken-is-your-password)

Generic php service built to query Troy Hunt's  API service and let you know how "broken" is your password, *without actually sending your password*.

More info about this on Troy's [first blog post](https://www.troyhunt.com/introducing-306-million-freely-downloadable-pwned-passwords/) *(about Pwned Passwords v1)*, the [follow up post](https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/) *(about v2, the version used by this library)* and finally [the post on Cloudflare](https://blog.cloudflare.com/validating-leaked-passwords-with-k-anonymity/) blog *(in which k-anonymity is explained in depth)*.

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

[](#installation)

Via composer: `composer require esolitos/pwnedpasswords`

Usage
-----

[](#usage)

The usage is very simple, just create the object and call

```
$mySafePassword = 'p@ssword';

$validator = Esolitos\PwnedPasswords\PwnageValidator();
$pwnedCount = $validator->getPasswordPwnage($mySafePassword);

print_r($pwnedCount)

> 47205
```

### *Bonus points: Drupal module*

[](#bonus-points-drupal-module)

This library was initially built for the drupal module: [Pwned Passwords](https://www.drupal.org/project/pwned_passwords)

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance71

Regular maintenance activity

Popularity36

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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.

###  Release Activity

Cadence

Every ~927 days

Total

4

Last Release

222d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c1de38888940a0d3b94ece87ff411488521f183d1d48dbe0cdb92acd067aa113?d=identicon)[esolitos](/maintainers/esolitos)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (6 commits)")[![nicrodgers](https://avatars.githubusercontent.com/u/165700?v=4)](https://github.com/nicrodgers "nicrodgers (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/esolitos-pwnedpasswords/health.svg)

```
[![Health](https://phpackages.com/badges/esolitos-pwnedpasswords/health.svg)](https://phpackages.com/packages/esolitos-pwnedpasswords)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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