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.
FAQ(Javascript) : User confirmation on close button of browser
-
Problem: On clicking the close button of browser ask for user confirmation
with a custom message Solution: Use the window.onbeforeunload method. This
metho...
6 days ago
0 comments:
Post a Comment