PHPackages                             divineomega/password\_exposed - 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. divineomega/password\_exposed

Abandoned → [jord-jd/password\_exposed](/?search=jord-jd%2Fpassword_exposed)Library[Security](/categories/security)

divineomega/password\_exposed
=============================

This PHP package provides a `password\_exposed` helper function, that uses the haveibeenpwned.com API to check if a password has been exposed in a data breach.

v5.0.2(3mo ago)2221.6M↓10.7%37[2 PRs](https://github.com/Jord-JD/password_exposed/pulls)4LGPL-3.0-onlyPHPPHP ^7.1||^8.0CI passing

Since Feb 1Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/Jord-JD/password_exposed)[ Packagist](https://packagist.org/packages/divineomega/password_exposed)[ Docs](https://github.com/Jord-JD/password_exposed)[ GitHub Sponsors](https://github.com/DivineOmega)[ RSS](/packages/divineomega-password-exposed/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (15)Versions (37)Used By (4)

🔒 Password Exposed Helper Function
==================================

[](#-password-exposed-helper-function)

This PHP package provides a `password_exposed` helper function, that uses the haveibeenpwned.com API to check if a password has been exposed in a data breach.

 [![](assets/images/password-exposed.png)](assets/images/password-exposed.png)

 [ ![Unit tests](https://github.com/Jord-JD/password_exposed/actions/workflows/unit-tests.yml/badge.svg?branch=master) ](https://github.com/Jord-JD/password_exposed/actions/workflows/unit-tests.yml) [ ![PHP syntax](https://github.com/Jord-JD/password_exposed/actions/workflows/php-linter.yml/badge.svg?branch=master) ](https://github.com/Jord-JD/password_exposed/actions/workflows/php-linter.yml) [ ![](https://camo.githubusercontent.com/9d9e2b94ef0124d99ead8cd4be256b599934a1c905c632c527dec00692575496/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f72642d6a642f70617373776f72645f6578706f7365642e737667) ](https://packagist.org/packages/jord-jd/password_exposed/stats)

CI is run via GitHub Actions (unit tests, Psalm, and PHP syntax checks).

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

[](#installation)

The `password_exposed` package can be easily installed using Composer. Just run the following command from the root of your project.

```
composer require "jord-jd/password_exposed"

```

If you have never used the Composer dependency manager before, head to the [Composer website](https://getcomposer.org/) for more information on how to get started.

Usage
-----

[](#usage)

To check if a password has been exposed in a data breach, just pass it to the `password_exposed` method.

Here is a basic usage example:

```
switch(password_exposed('hunter2')) {

    case PasswordStatus::EXPOSED:
        // Password has been exposed in a data breach.
        break;

    case PasswordStatus::NOT_EXPOSED:
        // Password has not been exposed in a known data breach.
        break;

    case PasswordStatus::UNKNOWN:
        // Unable to check password due to an API error.
        break;
}
```

If you prefer to avoid using helper functions, the following syntax is also available.

```
$passwordStatus = (new PasswordExposedChecker())->passwordExposed($password);
```

### SHA1 Hash

[](#sha1-hash)

You can also supply the SHA1 hash instead of the plain text password, by using the following method.

```
$passwordStatus = (new PasswordExposedChecker())->passwordExposedByHash($hash);
```

or...

```
$passwordStatus = password_exposed_by_hash($hash);
```

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance84

Actively maintained with recent releases

Popularity57

Moderate usage in the ecosystem

Community29

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 57.3% 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 ~105 days

Recently: every ~440 days

Total

29

Last Release

92d ago

Major Versions

v1.0.1 → v2.0.02018-02-08

v2.8.0 → v3.0.02019-02-04

v3.2.0 → v4.0.02026-02-14

v4.0.0 → v5.0.02026-02-14

PHP version history (3 changes)v2.4.0PHP &gt;=5.6

v3.0.0PHP ^7.1

v3.2.0PHP ^7.1||^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c580cdf7c14898fff179cdfc1085892091d5d2f49d917873a12365af9ac77c93?d=identicon)[Jord-JD](/maintainers/Jord-JD)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (82 commits)")[![nicklog](https://avatars.githubusercontent.com/u/462920?v=4)](https://github.com/nicklog "nicklog (28 commits)")[![jameswilddev](https://avatars.githubusercontent.com/u/3138458?v=4)](https://github.com/jameswilddev "jameswilddev (13 commits)")[![paragonie-scott](https://avatars.githubusercontent.com/u/11591518?v=4)](https://github.com/paragonie-scott "paragonie-scott (6 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (3 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (3 commits)")[![tacovandenbroek](https://avatars.githubusercontent.com/u/1499481?v=4)](https://github.com/tacovandenbroek "tacovandenbroek (2 commits)")[![paragonie-security](https://avatars.githubusercontent.com/u/15914520?v=4)](https://github.com/paragonie-security "paragonie-security (2 commits)")[![caugner](https://avatars.githubusercontent.com/u/495429?v=4)](https://github.com/caugner "caugner (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (1 commits)")

---

Tags

data-breachhelper-functionspasswordsphpsecurity

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/divineomega-password-exposed/health.svg)

```
[![Health](https://phpackages.com/badges/divineomega-password-exposed/health.svg)](https://phpackages.com/packages/divineomega-password-exposed)
```

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15224.3M65](/packages/opensearch-project-opensearch-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[swisnl/json-api-client

A PHP package for mapping remote JSON:API resources to Eloquent like models and collections.

211473.2k12](/packages/swisnl-json-api-client)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2322.9M248](/packages/open-telemetry-sdk)

PHPackages © 2026

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