note 114660 deleted from function.password-hash by dm
| From: | dm@php.net | Date: | Wed, 30 Apr 2014 00:00:07 +0000 |
| Subject: | note 114660 deleted from function.password-hash by dm | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-199376@lists.php.net to get a copy of this message | ||
Note Submitter: ic dot czech at gmail dot com
----
@dmp
If you need to generate $2a$ hash you must have php version older than 5.3.7 or use crypt() function
instead
<?php
$cost = 10;
$salt = 'usesomesillystringforsalt';
$hash = crypt('rasmuslerdorf', '$2a$'.$cost.'$'.$salt.'$');
?>
but it's less secured than $2y$