PHPackages                             tleckie/password - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. tleckie/password

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

tleckie/password
================

PHP manager password

1.0.0(5y ago)15MITPHPPHP ^8

Since May 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/teodoroleckie/password)[ Packagist](https://packagist.org/packages/tleckie/password)[ Docs](https://github.com/teodoroleckie/password)[ RSS](/packages/tleckie-password/feed)WikiDiscussions main Synced yesterday

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

PHP password manager - Password hash validator / password requirements validator
================================================================================

[](#php-password-manager---password-hash-validator--password-requirements-validator)

Password hash validator / password requirements validator

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4f7ce36e8eebf078057e9268dd2401dec209412fdeb2e5672212cf66f5fc69b8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74656f646f726f6c65636b69652f70617373776f72642f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/teodoroleckie/password/?branch=main)[![Build Status](https://camo.githubusercontent.com/e9101013a02909646c849ed576036947b72e1f66dd3bea0b2ec3ccb1974ffd6d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74656f646f726f6c65636b69652f70617373776f72642f6261646765732f6275696c642e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/teodoroleckie/password/build-status/main)[![Total Downloads](https://camo.githubusercontent.com/29c69f9cd819d39d3160bc53505445defb742828490988d985b08ef9e3e95f67/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746c65636b69652f70617373776f72642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tleckie/password)[![Code Intelligence Status](https://camo.githubusercontent.com/a9d5fbcb37eaaa68e41700081b876bb33ef4639838d5d7e3fb82f7d84dc14e08/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74656f646f726f6c65636b69652f70617373776f72642f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d61696e)](https://scrutinizer-ci.com/code-intelligence)

### Installation

[](#installation)

You can install the package via composer:

```
composer require tleckie/password
```

### Usage

[](#usage)

### Register user in database:

[](#register-user-in-database)

```
require_once "vendor/autoload.php";

use Tleckie\Password\Validator;
use Tleckie\Password\Requirements;

$passwordManager = new Validator();

$validatePasswordForRegistration = 'Secure123.Validator';

//Check if the password meets the requirements to store it.
$passwordManager->isValid($validatePasswordForRegistration); // true

// You can customize the password requirements
$requirements = new Requirements(10, false, true, false, true);
$passwordManager = new Validator($requirements);

// Generate the hash to be stored in the database (user|hash).
$storeInDataBase = $passwordManager->createHash($validatePasswordForRegistration);
// User registration completed!
```

### Login:

[](#login)

```
require_once "vendor/autoload.php";

use Tleckie\Password\Validator;

$passwordManager = new Validator();

// Find the user when logging in.
$loginPassword = 'Secure123.Validator';
$databaseUserHash = '$2y$08$WiqPWg.Gkd1CPVpCn/izl.DxhAeJCeo8SVpV03vBCb04.OgMEF81m';

// We verify the hash stored in the database with the login passwords
$passwordManager->passwordVerify($loginPassword, $databaseUserHash); // true

// That's all! I hope this helps you
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1882d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10697878?v=4)[Teodoro Leckie Westberg](/maintainers/teodoroleckie)[@teodoroleckie](https://github.com/teodoroleckie)

---

Top Contributors

[![teodoroleckie](https://avatars.githubusercontent.com/u/10697878?v=4)](https://github.com/teodoroleckie "teodoroleckie (8 commits)")

---

Tags

generatehashhash-validatorpasswordpassword-hashpassword-validatorphp-8php-passwordsafety-passwordsecuritysecurity-passwordvalidatorvalidatorsecuritypasswordhashgeneratephp-8password hashpassword validatortleckiephp-passwordhash-validatorsafety-passwordsecurity-password

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[rollerworks/password-strength-validator

Password-strength validator for Symfony

1446.0M7](/packages/rollerworks-password-strength-validator)[rollerworks/password-strength-bundle

Password-strength validator bundle for Symfony

1473.8M10](/packages/rollerworks-password-strength-bundle)[xemlock/htmlpurifier-html5

HTML5 support for HTML Purifier

1053.2M18](/packages/xemlock-htmlpurifier-html5)[jeremykendall/password-validator

Password Validator validates password\_hash generated passwords, rehashes passwords as necessary, and will upgrade legacy passwords.

14470.7k3](/packages/jeremykendall-password-validator)

PHPackages © 2026

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