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

ActiveLibrary

luppakorva/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.

v3.4(5y ago)0201LGPL-3.0-onlyPHPPHP &gt;=8.0

Since Feb 1Pushed 5y agoCompare

[ Source](https://github.com/Luppakorva/password_exposed)[ Packagist](https://packagist.org/packages/luppakorva/password_exposed)[ Docs](https://github.com/DivineOmega/password_exposed)[ RSS](/packages/luppakorva-password-exposed/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (16)Versions (28)Used By (1)

🔒 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)

 [ ![Build Status](https://camo.githubusercontent.com/6b8b1376a47810d166c14126c6db5595cee27f4345844ba9b08e1cdbc25d05cb/68747470733a2f2f7472617669732d63692e6f72672f446976696e654f6d6567612f70617373776f72645f6578706f7365642e7376673f6272616e63683d6d6173746572) ](https://travis-ci.org/DivineOmega/password_exposed) [ ![StyleCI](https://camo.githubusercontent.com/9107aa48fb3202339e48725df2b0292f9a3430ad32f8d111e3baae9eaf41a45f/68747470733a2f2f7374796c6563692e696f2f7265706f732f3131393834353839362f736869656c643f6272616e63683d6d6173746572) ](https://styleci.io/repos/119845896) [ ![](https://camo.githubusercontent.com/afbf9c6c64feb3dad268f349b7dd1533d120646aa964145eac553d22ba933f31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f446976696e654f6d6567612f70617373776f72645f6578706f7365642e737667) ](https://packagist.org/packages/divineomega/password_exposed/stats)

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 "divineomega/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

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 60.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 ~44 days

Recently: every ~138 days

Total

27

Last Release

1863d ago

Major Versions

v1.0.1 → v2.0.02018-02-08

v2.8.0 → v3.0.02019-02-04

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

v3.0.0PHP ^7.1

v3.2PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/275c0d84dc554be134050185509d6ebb9424db8da6a6ab9dbff66f4805204520?d=identicon)[luppakorva](/maintainers/luppakorva)

---

Top Contributors

[![Jord-JD](https://avatars.githubusercontent.com/u/650645?v=4)](https://github.com/Jord-JD "Jord-JD (71 commits)")[![nicklog](https://avatars.githubusercontent.com/u/462920?v=4)](https://github.com/nicklog "nicklog (28 commits)")[![paragonie-scott](https://avatars.githubusercontent.com/u/11591518?v=4)](https://github.com/paragonie-scott "paragonie-scott (6 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (3 commits)")[![Luppakorva](https://avatars.githubusercontent.com/u/10204405?v=4)](https://github.com/Luppakorva "Luppakorva (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)")

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/luppakorva-password-exposed/health.svg)](https://phpackages.com/packages/luppakorva-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.6M647](/packages/sylius-sylius)[opensearch-project/opensearch-php

PHP Client for OpenSearch

15024.3M64](/packages/opensearch-project-opensearch-php)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[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)

PHPackages © 2026

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