note 100752 added to function.md5
| From: | jfernandes at tecnica dot cc | Date: | Thu, 04 Nov 2010 11:48:49 +0000 |
| Subject: | note 100752 added to function.md5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-173745@lists.php.net to get a copy of this message | ||
@Anonymous 08-Jun-2010 08:36
just a small addition to your function:
I think you should MD5 your password just before returning it
because, let's say, 2 different users enter 2 passwords like for example
password1
password2
then when we substring it may return exactly the same hash.
So imo it's best to add this line:
$new_pword .= md5($new_pword);
after:
if( defined('SALT_TWO') ):
$new_pword = md5(SALT_TWO);
endif;
Best Regards
----
Server IP: 69.147.83.197
Probable Submitter: 213.63.143.72
----
Manual Page -- http://www.php.net/manual/en/function.md5.php
Edit -- https://master.php.net/note/edit/100752
Del: integrated -- https://master.php.net/note/delete/100752/integrated
Del: useless -- https://master.php.net/note/delete/100752/useless
Del: bad code -- https://master.php.net/note/delete/100752/bad+code
Del: spam -- https://master.php.net/note/delete/100752/spam
Del: non-english -- https://master.php.net/note/delete/100752/non-english
Del: in docs -- https://master.php.net/note/delete/100752/in+docs
Del: other reasons-- https://master.php.net/note/delete/100752
Reject -- https://master.php.net/note/reject/100752
Search -- https://master.php.net/manage/user-notes.php