PHPackages                             eloquent/pbkdf2-compat - 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. eloquent/pbkdf2-compat

AbandonedArchivedLibrary[Security](/categories/security)

eloquent/pbkdf2-compat
======================

A compatibility library for the PHP 5.5 function hash\_pbkdf2().

1.0.1(12y ago)13143.3k2MITPHPPHP &gt;=5.3

Since May 1Pushed 12y agoCompare

[ Source](https://github.com/eloquent/pbkdf2-compat)[ Packagist](https://packagist.org/packages/eloquent/pbkdf2-compat)[ Docs](https://github.com/eloquent/pbkdf2-compat)[ RSS](/packages/eloquent-pbkdf2-compat/feed)WikiDiscussions develop Synced 3w ago

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

PBKDF2-compat
=============

[](#pbkdf2-compat)

*A compatibility library for the PHP 5.5 function hash\_pbkdf2().*

[![The most recent stable version is 1.0.1](https://camo.githubusercontent.com/ce803b160b3c65c7b9a8cda016696c7f73a7fc7fed122297a3ed076013d04758/687474703a2f2f696d672e736869656c64732e696f2f3a73656d7665722d312e302e312d627269676874677265656e2e737667 "This project uses semantic versioning")](http://semver.org/)[![Current build status image](https://camo.githubusercontent.com/91c6afb5b9f9d4843f314f9cead295302e8fc5dc86cb7bc27bee0513ab0a7bdc/687474703a2f2f696d672e736869656c64732e696f2f7472617669732f656c6f7175656e742f70626b6466322d636f6d7061742f646576656c6f702e737667 "Current build status for the develop branch")](https://travis-ci.org/eloquent/pbkdf2-compat)[![Current coverage status image](https://camo.githubusercontent.com/720107d4112c8a6c107d7c1871b33400d630b6fddfaded4834792f1fb43a5d82/687474703a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f656c6f7175656e742f70626b6466322d636f6d7061742f646576656c6f702e737667 "Current test coverage for the develop branch")](https://coveralls.io/r/eloquent/pbkdf2-compat)

Installation and documentation
------------------------------

[](#installation-and-documentation)

- Available as [Composer](http://getcomposer.org/) package [eloquent/pbkdf2-compat](https://packagist.org/packages/eloquent/pbkdf2-compat).

What does it do?
----------------

[](#what-does-it-do)

This library provides a forwards-compatible implementation of the [hash\_pbkdf2()](http://php.net/hash_pbkdf2) function introduced in PHP 5.5. It allows the use of this function in versions of PHP prior to 5.5, and falls back to the native function when it is available.

Usage
-----

[](#usage)

See the [PHP manual entry](http://php.net/hash_pbkdf2).

Behaviour of length parameter
-----------------------------

[](#behaviour-of-length-parameter)

Although the documentation does not specify, the $length parameter refers to the resulting string length, not the length of the raw hash. This means that when $raw\_output is false, $length needs to be doubled to produce a hash containing the same amount of data (because hex encoding doubles the number of bytes in the result string).

Acknowledgements
----------------

[](#acknowledgements)

Inspired by [ircmaxell/password\_compat](https://github.com/ircmaxell/password_compat). PBKDF2 implementation derived from Symfony's [Pbkdf2PasswordEncoder](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Security/Core/Encoder/Pbkdf2PasswordEncoder.php).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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 ~144 days

Total

3

Last Release

4513d ago

Major Versions

0.1.0 → 1.0.02013-06-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/100152?v=4)[Erin](/maintainers/ezzatron)[@ezzatron](https://github.com/ezzatron)

---

Top Contributors

[![ezzatron](https://avatars.githubusercontent.com/u/100152?v=4)](https://github.com/ezzatron "ezzatron (22 commits)")

---

Tags

compatibilitypkcshashcompatpbkdf2hash\_pbkdf2pbkdfpkcs5

### Embed Badge

![Health badge](/badges/eloquent-pbkdf2-compat/health.svg)

```
[![Health](https://phpackages.com/badges/eloquent-pbkdf2-compat/health.svg)](https://phpackages.com/packages/eloquent-pbkdf2-compat)
```

###  Alternatives

[lastguest/murmurhash

MurmurHash3 Hash

12911.2M59](/packages/lastguest-murmurhash)[passwordlib/passwordlib

A Password Hashing Library

372222.4k7](/packages/passwordlib-passwordlib)[sarciszewski/php-future

Polyfill new (5.6+) features into old (5.4+) versions of PHP

411.5M7](/packages/sarciszewski-php-future)[paragonie/password_lock

Wraps Bcrypt-SHA2 in Authenticated Encryption

19350.6k1](/packages/paragonie-password-lock)[miladrahimi/phpcrypt

Encryption, decryption, and hashing tools for PHP projects

3074.2k2](/packages/miladrahimi-phpcrypt)[ayesh/stateless-csrf

Secret-key based state-less CSRF token generator and validator for PHP 8. State-less means you do not have to store the CSRF token in session or database.

3224.0k](/packages/ayesh-stateless-csrf)

PHPackages © 2026

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