http://qs321.pair.com?node_id=144543


in reply to MD5 compatibility in PHP

Given that MD5 is actually a ratified algorithm, I would say yes.

There however may be differences in the implementation of each algorithm that cause the output to be different. If this is the case, you'll have to proove which one is incorrect against a known correct hash.

Another difference may be in the output method you choose, for example:

  • $digest = md5($data);
  • $digest = md5_hex($data);
  • $digest = md5_base64($data);
    Taken from the perldoc Digest::MD5

    Fundimentally, if the algorithm has been composed following the rfc you will have no worries.