views:

98

answers:

1

The two data blocks are from this site,but failed to produce the collision :

var_dump(md5('d131dd02c5e6eec4693d9a0698aff95c2fcab58712467eab4004583eb8fb7f8955ad340609f4b30283e488832571415a085125e8f7cdc99fd91dbdf280373c5bd8823e3156348f5bae6dacd436c919c6dd53e2b487da03fd02396306d248cda0e99f33420f577ee8ce54b67080a80d1ec69821bcb6a8839396f9652b6ff72a70') == md5('d131dd02c5e6eec4693d9a0698aff95c2fcab50712467eab4004583eb8fb7f8955ad340609f4b30283e4888325f1415a085125e8f7cdc99fd91dbd7280373c5bd8823e3156348f5bae6dacd436c919c6dd53e23487da03fd02396306d248cda0e99f33420f577ee8ce54b67080280d1ec69821bcb6a8839396f965ab6ff72a70'));

Which output a bool(false),is there something I did wrongly?

EDIT Best with a demo?

+5  A: 

You are calculating the md5 hash of the ASCII text. You will need to convert the ASCII hex representation to actual binary bytes, then run md5 on the blocks.

Greg Hewgill
How to convert it to binary bytes?
Mask
It looks like PHP may support arbitrary characters inside strings, so try typing: `md5('\xd1\x31\xdd\x02...` However, I'm not certain this will do what you want so some experimentation will be necessary.
Greg Hewgill