What’s the difference between md5(), crc32() and sha1() crypto on PHP?

php

Solution

They each implement a different cryptographic hash function, and each hash function does generate a different sized hash. The main difference between the three functions you've shown here is that sha1 and md5 are actually meant to be cryptographically secure. crc32 (crc stands for cyclic redundancy check) function is not a crypto function and is meant to generate a hash that will be used to check the integrity of a file (mostly to determine if it was corrupted during download).

Just a side note: Please don't use md5 or sha1 for any real crypto work (such as hashing passwords). These are both terribly broken (just ask evernote or any of the other companies burned by using this old algorithm). Instead use the php crypt() function and use the SHA-256 or SHA-512 (better than 256), or blowfish. And always salt your hashes...

Problem

The difference is in the length they generate. crc32() gives 32 bit code sha1() gives 128 bit code md5() gives 160 bit code is it right?? or Is there any more differences among them?

Original source