bash - echo -n aWord | md5 not returning expected result -


when pass line echo -n aword | md5 directly in shell expected result - same php md5('aword') - when call code file different string.

please help.

if following md5s:

=$ echo -n aword | md5sum a72ef25b2fa8080e6e0643c967284842  - 

and file:

=$ cat test.file  aword  =$ md5sum test.file  1d03663ed556e850007c886ce5ad3ade  test.file 

this because there additional character in file - new line character:

=$ hexdump -c test.file  00000000  61 57 6f 72 64 0a                                 |aword.| 00000006 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -