eloquent/pbkdf2-compat

This package is abandoned and no longer maintained. No replacement package was suggested.

A compatibility library for the PHP 5.5 function hash_pbkdf2().

1.0.1 2014-02-13 12:35 UTC

This package is auto-updated.

Last update: 2020-02-06 04:54:35 UTC


README

A compatibility library for the PHP 5.5 function hash_pbkdf2().

The most recent stable version is 1.0.1 Current build status image Current coverage status image

Installation and documentation

What does it do?

This library provides a forwards-compatible implementation of the 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

See the PHP manual entry.

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

Inspired by ircmaxell/password_compat. PBKDF2 implementation derived from Symfony's Pbkdf2PasswordEncoder.