PHP Strings Primer - Hashing
(Page 34 of 37 )
Hashing provides a means to create a signature of some data. Two of its uses include ensuring the integrity of data and user authentication. We will discuss both uses in this section, but first let's list the functions that will be covered.
md5 (string) -This generates a 32 character hexadecimal number as specified by the RSA's MD5 Message-Digest Algorithm. It accepts a string of data as its only parameter.md5_file (filename) -This function generates the same type of hash as the md5() function, but instead of a string of data it accepts a filename contained in a string.crc32 (string) -With this function you can create a checksum of a string of data.sha1 (string) -A 40 character hexadecimal hash as produced by the US Secure Hash Algorithm 1 is returned by this function. It accepts a string as its only parameter.
Next: Verifying Integrity >>
More Programming Basics Articles
More By Matt Wade