Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: MD5 compatibility in PHP

by jepri (Parson)
on Feb 11, 2002 at 00:51 UTC ( #144544=note: print w/replies, xml ) Need Help??

in reply to MD5 compatibility in PHP

You're usually on the ball, which is why I'm a little confused that you didn't just run the corresponding hash functions on an arbitrary piece of text, say the string: "Some test characters for the hash function" and compare the results.

Also run them on the empty string "" just to be sure.

It used to be that such functions would use the underlying system libraries, but now languages tend to use their own library functions. Nonetheless if it says 'MD5' I'd guess there's a high chance they will be the same function. There's probably a standard somewhere.

Update: My thinking, which may not be clear to casual bystanders, is that if two functions both claiming to be MD5 hashing functions return the same values for the null value and any other representative value then they are probably the same function. I keep thinking that I want the kernel (or nullspace) and a basis but that's not going to work because the functions are many-to-one. Wait four months till I finish my crypto course and then I'll be able to tell you :D

I didn't believe in evil until I dated it.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2021-05-12 11:16 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (126 votes). Check out past polls.