md5 differences

P

Python

Hi there!

I'm trying to match the results of an md5 checksum done in a tcsh shell.
I keep getting different results and can't find anything on google...

here's an example:

Arno@Computer:~% echo "hello" | md5
b1946ac92492d2347c6235b4d2611184

Arno@Computer:~% python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.'5d41402abc4b2a76b9719d911017c592'


How do I get the same results?

thanks
Arno
 
R

Richard Brodie

here's an example:
Arno@Computer:~% echo "hello" | md5
b1946ac92492d2347c6235b4d2611184
How do I get the same results?

Checksum the same string.
'b1946ac92492d2347c6235b4d2611184'
 
P

Python

Checksum the same string.

'b1946ac92492d2347c6235b4d2611184'

hmm and this then:

Arno@Computer:~% echo "test" > test.txt

Arno@Computer:~% md5 test.txt
MD5 (test.txt) = d8e8fca2dc0f896fd7cb4cb0031ba249

Arno@Computer:~% python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.'90364ed45b452d43378629c20543a81d'


even
echo -n "hello" | md5
doesn't return the same number


gr
Arno
 
D

D'Arcy J.M. Cain

hmm and this then:

Arno@Computer:~% echo "test" > test.txt

Arno@Computer:~% md5 test.txt
MD5 (test.txt) = d8e8fca2dc0f896fd7cb4cb0031ba249

Arno@Computer:~% python
Python 2.5.1 (r251:54863, Jan 17 2008, 19:35:17)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.'90364ed45b452d43378629c20543a81d'

You're going to smack yourself on the head over this one. :)
 
P

Python

The smart money is betting on "because the OP goofed when he
was cutting/pasting stuff from his terminal window into his
posting."
I did! I did!

my bad... i cut some crap from the path to make it a bit easier to read
but that was before the time i knew it was checksumming the
actual path in stead of the contents of the file.
So I figured it didn't matter...

;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top