PHP's md5() function returns the exact same hash value as
MySQL's MD5() function and other than stated before as the
md5sum command line tool on most Linux/UNIX systems.
Note that trailing line feeds do matter, when you apply
md5sum on a text file:
shell> php -r 'echo md5("test");'
--> 098f6bcd4621d373cade4e832627b4f6
mysql> select md5('test');
--> 098f6bcd4621d373cade4e832627b4f6
shell> echo -n test | md5sum
--> 098f6bcd4621d373cade4e832627b4f6
In the third example, note the '-n' option, which prevents
echo from appending a line feed.
----
Server IP: 217.160.72.57
Probable Submitter: 84.130.154.44
----
Manual Page -- http://
www.php.net/manual/en/function.md5.php
Edit -- https://master
.php.net/note/edit/74185
Del: integrated -- h
ttps://master.php.net/note/delete/74185/integrated
Del: useless -- http
s://master.php.net/note/delete/74185/useless
Del: bad code -- htt
ps://master.php.net/note/delete/74185/bad+code
Del: spam -- https:/
/master.php.net/note/delete/74185/spam
Del: non-english --
https://master.php.net/note/delete/74185/non-english
Del: in docs -- http
s://master.php.net/note/delete/74185/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/74185
Reject -- https://mast
er.php.net/note/reject/74185
Search -- https://
master.php.net/manage/user-notes.php
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|