note 74144 added to function.md5
| From: | jlinkels at linkels dot net | Date: | Tue, 27 Mar 2007 12:47:25 +0000 |
| Subject: | note 74144 added to function.md5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-124841@lists.php.net to get a copy of this message | ||
The PHP MD5() function does not encrypt a string in the same way as the standard *nix MD5SUM
function.
If you want to access an encrypted string in a MySQL database from different programs in *nix, and
also from PHP, use the MySQL MD5() function, as in:
UPDATE users SET pwd=md5('mypass') WHERE user='myuser';
This will generate the same encrypted string as in PHP md5('mypass').
I am sure it has some security issues, especially if the traffic between the other application and
MySQL can be eavesdropped, but for simple encrypted storage it works fine.
----
Server IP: 69.147.83.197
Probable Submitter: 200.6.145.3
----
Manual Page -- http://www.php.net/manual/en/function.md5.php
Edit -- https://master.php.net/note/edit/74144
Del: integrated -- https://master.php.net/note/delete/74144/integrated
Del: useless -- https://master.php.net/note/delete/74144/useless
Del: bad code -- https://master.php.net/note/delete/74144/bad+code
Del: spam -- https://master.php.net/note/delete/74144/spam
Del: non-english -- https://master.php.net/note/delete/74144/non-english
Del: in docs -- https://master.php.net/note/delete/74144/in+docs
Del: other reasons-- https://master.php.net/note/delete/74144
Reject -- https://master.php.net/note/reject/74144
Search -- https://master.php.net/manage/user-notes.php