note 101992 deleted from function.mcrypt-encrypt by danbrown
| From: | danbrown@php.net | Date: | Fri, 21 Jan 2011 21:25:16 +0000 |
| Subject: | note 101992 deleted from function.mcrypt-encrypt by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-175982@lists.php.net to get a copy of this message | ||
Note Submitter: Adrien
----
The previous comment by anonymous is true but instead of increasing the password length, it is a
better idea to use a Key derivation function to generate a key from a password. It adds a lot of
entropy to your key without impacting your users (that will do something dumb in reaction)
You could use pbkdf2, I saw an implementation given in comments here : http://php.net/manual/en/function.hash-hmac.php
Not tried it yet, we are using sha256 instead.
You can then compare the hashed password to the hashed password in your database.
Hope it helps.