OpenSSL and MD5Fingerprint
Posted: Sun Aug 07, 2011 9:04 pm
Head scratcher here which will require some Linux knowledge. I'm using Purebasic in Windows XP, but need someone to explain what is going on:
(Ubuntu):
Result: fd820a2b4461bddd116c1518bc4b0f77
(Purebasic XP):
Result: fd820a2b4461bddd116c1518bc4b0f77
Both are the same. However, in Linux, if you add the binary option you get something almost the same. Check the first four characters, they are swapped around, the hash is almost the same all the way through, but not quite. What exactly is the -binary option doing and how can I replicate it in Purebasic please? (Is it called 'raw md5'?)
(Ubuntu):
Result: [0000000] 82fd 2b0a 6144 ddbd 6c11 1815 4bbc 770f
(Ubuntu):
Code: Select all
echo -n "william" | openssl dgst -md5
(Purebasic XP):
Code: Select all
me$="william"
Debug MD5Fingerprint(@me$, Len(me$))
Both are the same. However, in Linux, if you add the binary option you get something almost the same. Check the first four characters, they are swapped around, the hash is almost the same all the way through, but not quite. What exactly is the -binary option doing and how can I replicate it in Purebasic please? (Is it called 'raw md5'?)
(Ubuntu):
Code: Select all
echo -n "william" | openssl dgst -md5 -binary | hexdump