PHPackages                             controlabs/password-helper - 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. controlabs/password-helper

AbandonedArchivedLibrary[Security](/categories/security)

controlabs/password-helper
==========================

Helper to encrypt and verify passwords

v1.0.1(7y ago)024[1 issues](https://github.com/controlabs/php-password-helper/issues)MITPHP

Since Oct 25Pushed 7y ago1 watchersCompare

[ Source](https://github.com/controlabs/php-password-helper)[ Packagist](https://packagist.org/packages/controlabs/password-helper)[ RSS](/packages/controlabs-password-helper/feed)WikiDiscussions master Synced 3d ago

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

php-password-helper
===================

[](#php-password-helper)

[![Build Status](https://camo.githubusercontent.com/47c084c7d5a87be1c14d4765b9fc47e42f83e42f0a0decf67197161e926783fb/68747470733a2f2f7472617669732d63692e6f72672f636f6e74726f6c6162732f7068702d70617373776f72642d68656c7065722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/controlabs/php-password-helper)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/de03f86abb813f11294b84924dce42fd66ddb5ebc1d02a72f4bab90b30169957/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c6162732f7068702d70617373776f72642d68656c7065722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/controlabs/php-password-helper/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/75c6bda107f207af2b5a12b17112f1357e0386112eb68627381162c3caca762e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c6162732f7068702d70617373776f72642d68656c7065722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/controlabs/php-password-helper/?branch=master)[![Build Status](https://camo.githubusercontent.com/6f3b591741dc8651a216a14db895a240254333ae487e182dcac6b1efa066b30d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c6162732f7068702d70617373776f72642d68656c7065722f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/controlabs/php-password-helper/build-status/master)[![Code Intelligence Status](https://camo.githubusercontent.com/c5f01e2948e0fd344def1028e8990a94df22879bca407c4564c1eb0809fc1f78/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636f6e74726f6c6162732f7068702d70617373776f72642d68656c7065722f6261646765732f636f64652d696e74656c6c6967656e63652e7376673f623d6d6173746572)](https://scrutinizer-ci.com/code-intelligence)[![PHPStan](https://camo.githubusercontent.com/441b5874ce4df0a2defc892979c96c46889b69cb32119d04f0b48626349f8bc9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d627269676874677265656e2e7376673f7374796c653d666c6174)](https://github.com/phpstan/phpstan)

[![License](https://camo.githubusercontent.com/78555985294d2d943383cc950e067399c401c439840168b3edf40fbd4875976f/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f70617373776f72642d68656c7065722f6c6963656e7365)](https://packagist.org/packages/controlabs/password-helper)[![Latest Stable Version](https://camo.githubusercontent.com/994c9f6aead5af3fcdef60080ec0b78aaa6dfd66a19a66e27d19ee6cf7580461/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f70617373776f72642d68656c7065722f762f737461626c65)](https://packagist.org/packages/controlabs/password-helper)[![Latest Unstable Version](https://camo.githubusercontent.com/84330efc55e4ecf07a86ee604c8abfd1e88b72bd298bc6d949ec180be192ba00/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f70617373776f72642d68656c7065722f762f756e737461626c65)](https://packagist.org/packages/controlabs/password-helper)[![composer.lock](https://camo.githubusercontent.com/b015cdc74047666b475bfcfe4f98761a193b1ada14aafc6800a3e42bbd32a468/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f70617373776f72642d68656c7065722f636f6d706f7365726c6f636b)](https://packagist.org/packages/controlabs/password-helper)[![Total Downloads](https://camo.githubusercontent.com/b41c2a398d063971409c20b861d9e917251b6aa6ca7cd84c357dce0250216f0a/68747470733a2f2f706f7365722e707567782e6f72672f636f6e74726f6c6162732f70617373776f72642d68656c7065722f646f776e6c6f616473)](https://packagist.org/packages/controlabs/password-helper)

Helper to encrypt and verify passwords.

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

[](#installation)

```
composer require controlabs/password-helper

```

Usage
-----

[](#usage)

##### Encrypting password

[](#encrypting-password)

```
use Controlabs\Helper\Password as PasswordHelper;

$helper = new PasswordHelper();

$passwordData = $helper->encrypt($_POST['password']);

$user = new User();
$user->login = 'controlabs';
$user->password = $passwordData->password();
$user->password_salt = $passwordData->salt();
$user->save();
```

##### Verify password

[](#verify-password)

```
use Controlabs\Http\Exception\Unauthorized; // composer require controlabs/http-exceptions (optional)
use Controlabs\Helper\Password as PasswordHelper;

$helper = new PasswordHelper();

$user = User::findByLogin('login', $_POST['login']);

$accept = $user and $helper->verify($user->password, $_POST['password'], $user->password_salt);

if(!$accept) {
    throw new Unauthorized('Invalid login or password.');
}
```

License
-------

[](#license)

This software is open source, licensed under the The MIT License (MIT). See [LICENSE](https://github.com/controlabs/php-password-helper/blob/master/LICENSE) for details.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 61.5% 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 ~0 days

Total

2

Last Release

2758d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/43862284?v=4)[Controlabs](/maintainers/controlabs)[@controlabs](https://github.com/controlabs)

---

Top Contributors

[![carlosrodriguesf](https://avatars.githubusercontent.com/u/16665616?v=4)](https://github.com/carlosrodriguesf "carlosrodriguesf (8 commits)")[![martinusso](https://avatars.githubusercontent.com/u/158559?v=4)](https://github.com/martinusso "martinusso (5 commits)")

---

Tags

encrypthelperpasswordphpverify

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[defuse/php-encryption

Secure PHP Encryption Library

3.9k162.4M214](/packages/defuse-php-encryption)[roave/security-advisories

Prevents installation of composer packages with known security vulnerabilities: no API, simply require it

2.9k97.3M6.4k](/packages/roave-security-advisories)[mews/purifier

Laravel 5/6/7/8/9/10 HtmlPurifier Package

2.0k16.7M113](/packages/mews-purifier)[robrichards/xmlseclibs

A PHP library for XML Security

41278.1M118](/packages/robrichards-xmlseclibs)[bjeavons/zxcvbn-php

Realistic password strength estimation PHP library based on Zxcvbn JS

86917.5M63](/packages/bjeavons-zxcvbn-php)[enlightn/security-checker

A PHP dependency vulnerabilities scanner based on the Security Advisories Database.

33732.2M110](/packages/enlightn-security-checker)

PHPackages © 2026

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