Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what is the difference between hash() and md5()?

Status
Not open for further replies.

unomateo

IS-IT--Management
May 9, 2006
38
US
Studying for php cert, and I ran across a practice question:

The fingerprint of a string can be determined using which of the following?

fingerprint() - 99.9% sure this is not it
hash()
md5()
none of the above

I think it is hash, but since hash can take md5 as an argument, isn't hash and md5 basically the same thing?
 
hash is an optimised and abstracted method of hashing with different algorithms.

hash, using the md5 algo, will give the same result as md5(). but on anything other than small strings, hash() should be about 3 times as quick.

fingerprint, to me, is too vague a term to discern whether the question drives at one function over another.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top