hash - password_hash equivalent for php 5.4? -


this question has answer here:

i developed site using xampp php 5.5 installed. realize host has php 5.4 (cannot update 5.5 yet). problem cannot use new php 5.5 password_hash() feature. there equivalent method hashing salt php 5.4?

is there way equivalent code (below) work in php 5.4?

$options = [   'salt' => uniqid(mt_rand(), true),   'cost' => 12  ]; $hash = password_hash($mypassword, password_default, $options); 

use password_compat. it's backward compatible library emulate password_hash() in older versions of php (5.3.7+).


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -