Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: MD5 compatibility in PHP

by Ryszard (Priest)
on Feb 11, 2002 at 00:50 UTC ( #144543=note: print w/replies, xml ) Need Help??


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.

  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://144543]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (5)
    As of 2021-04-14 20:56 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?