Because echo includes a newline character at the end, which changes the
MD5 sum:

[EMAIL PROTECTED] /usr/local/openvpn $ echo test | hexdump -c
0000000   t   e   s   t  \n
0000005

instead, try:
[EMAIL PROTECTED] /usr/local/openvpn $ echo -n test | md5sum
098f6bcd4621d373cade4e832627b4f6  -

Jamie


On Thu, September 29, 2005 2:25 pm, Nick Wiltshire wrote:
> Hi all,
>
>
> why is it that if I do
>
> echo(md5("test"));
>
> in PHP I get 098f6bcd4621d373cade4e832627b4f6
>
> but....
>
> #echo 'test' | md5sum
>
>
> gives me d8e8fca2dc0f896fd7cb4cb0031ba249
>
> Nick
>
>
> _______________________________________________
> clug-talk mailing list [email protected]
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
>
>
>


-- 
Jamie Furtner [EMAIL PROTECTED]
"The difference between intelligence and stupidity is that
 intelligence has its limits."
  --unknown


_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to