Monday, November 10, 2008

Question: What is the difference between md5()‚ crc32() and sha1() crypto on PHP?

Question: What is the difference between md5()‚ crc32() and sha1() crypto on PHP?
Answer:
All these functions generate a hash code and the basic difference among them is the length of the generated hash. 1) crc32() - Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the string. This is usually used to validate the integrity of data being transmitted. Generates 10-character hexadecimal number. 2) sha1() - Calculates the sha1 hash of a string using the "US Secure Hash Algorithm 1". Generates 40-character hexadecimal number. 3) md5() - Calculates the MD5 hash of a string using the "RSA Data Security‚ Inc. MD5 Message-Digest Algorithm" and returns that hash. Generates 32-character hexadecimal number.

No comments:

security header validate

  HTTP Security Headers Check Tool - Security Headers Response (serpworx.com)