Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: MD5 compatibility in PHP

by Ryszard (Priest)
on Feb 11, 2002 at 00:50 UTC ( [id://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
    Domain Nodelet?
    Node Status?
    node history
    Node Type: note [id://144543]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others drinking their drinks and smoking their pipes about the Monastery: (8)
    As of 2024-04-19 09:41 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found