note 43655 added to function.md5
| From: | kristian at amazing dot as | Date: | Tue, 29 Jun 2004 11:12:27 +0000 |
| Subject: | note 43655 added to function.md5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-72107@lists.php.net to get a copy of this message | ||
If the string you are encrypting via md5() is short, is it very easy to break via brute forcers.
This problem can be solved by making your own encryption with md5() and strrev() several times.
<?php
function md5x($var) {
return strrev(md5(md5(strrev(md5("$var")))));
}
?>
Use your imagination to make your own encryption this way. Just make sure you use the same
encryption everywhere on your site, so the output will be the same.
----
Manual Page -- http://www.php.net/manual/en/function.md5.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43655
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43655&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43655&report=yes
Search -- http://master.php.net/manage/user-notes.php