note 112680 deleted from function.password-hash by nikic
| From: | nikic@php.net | Date: | Mon, 26 Aug 2013 12:39:56 +0000 |
| Subject: | note 112680 deleted from function.password-hash by nikic | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196080@lists.php.net to get a copy of this message | ||
Note Submitter: nickshanks at nickshanks dot com
----
Just to re-iterate what is said above in the documentation, the result of this function will be
longer than 60 chars at some point in the futureâif you allow PHP to use its default
costâeven if you continue to specify the bcrypt algorithm, because computers get faster all the
time and the default cost value will be increased in future releases of PHP.
For example:
strlen(password_hash('foo', PASSWORD_BCRYPT, ['cost' => 100])) == 61
strlen(password_hash('foo', PASSWORD_BCRYPT, ['cost' => 1000])) == 62
The cost is stored in the output as a decimal integer using ASCII digits.