PHPackages                             zubzet/password-hash-utilities - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zubzet/password-hash-utilities

ActiveLi[Utility &amp; Helpers](/categories/utility)

zubzet/password-hash-utilities
==============================

1.0.0(4y ago)070.7k↓45.1%1GPL-3.0-or-laterPHPPHP &gt;=8.0

Since Apr 17Pushed 1y ago1 watchersCompare

[ Source](https://github.com/zubzet/password-hash-utilities)[ Packagist](https://packagist.org/packages/zubzet/password-hash-utilities)[ RSS](/packages/zubzet-password-hash-utilities/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (1)

ZubZet Password Hash Utilities
==============================

[](#zubzet-password-hash-utilities)

Best enjoyed with `zubzet/framework`, this utility adds support for custom hashing algorithms, the default being `bcrypt`, and logic implementations. Keep your passwords safe and resistant to rainbow tables.

> zubzet/password-hash-utilities changed my life
>
> — Adrian

System requirements
-------------------

[](#system-requirements)

- PHP version has to be at least 8.0.0

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

[](#installation)

Using Composer:

```
composer require zubzet/password-hash-utilities

```

Examples
--------

[](#examples)

### Basic usage

[](#basic-usage)

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

use ZubZet\Utilities\PasswordHash\PasswordHash;

$password = PasswordHash::create("password123");
$check = PasswordHash::check(
    "password123",
    $password->hash,
    $password->salt,
    $password->hashingName
);

var_dump($check->matches);
```

### Advanced usage

[](#advanced-usage)

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

use ZubZet\Utilities\PasswordHash\PasswordHash;

// Set a custom CharUniverse
PasswordHash::setCharacterUniverse(range("a", "z"));

PasswordHash::setHashingAlgorithm(
    "bcryptExpensive",
    function($input) {
        return password_hash($input, PASSWORD_BCRYPT, [
            "cost" => 12
        ]);
    },
    function($input, $hash) {
        return password_verify($input, $hash);
    }
);

PasswordHash::defineCustomLogic("reverse", function($input, $salt, $pepper) {
    $input .= $salt.$pepper;
    return strrev($input);
});

$password = PasswordHash::create(
    "password123",
    hashingName: "bcryptExpensive",
    customLogicName: "reverse",
);

$check = PasswordHash::check(
    "password123",
    $password->hash,
    $password->salt,
    $password->hashingName,
    $hashingNameTarget = "bcrypt",
    $password->customLogicName,
    $customLogicNameTarget = "0.9",
);

// This will only be true if the password also matches
if($check->hasUpdate) {
    // Replace
    $password->hash;
    $password->salt;
    $password->hashingName;
    $password->customLogicName;
}

if($check->matches) {
    // Access granted
} else {
    // Password is wrong
}

var_dump($check);
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

Every ~0 days

Total

2

Last Release

1492d ago

### Community

Maintainers

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

---

Top Contributors

[![alexander-zierhut](https://avatars.githubusercontent.com/u/26348781?v=4)](https://github.com/alexander-zierhut "alexander-zierhut (23 commits)")

### Embed Badge

![Health badge](/badges/zubzet-password-hash-utilities/health.svg)

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

###  Alternatives

[michaeljennings/carpenter

A PHP package to create HTML tables from a data store that can be sorted and paginated.

191.7k](/packages/michaeljennings-carpenter)[lukesnowden/menu

Effortless menu building for Laravel 4

142.5k](/packages/lukesnowden-menu)

PHPackages © 2026

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