|
Main (PHP)
3rd Party Streams
Resources
Code Snippets
Affiliates
|
|
|
| |
Generating a Checksum in PHP |
| By admin (2007-10-11. 8208 views.) |
PHP has two built-in functions that enable easy generation of a checksum: md5() and sha1(). |
|
<?php Both functions take a given string and produce a checksum value. While it could be used to do something like password validation (I think the math involved is provable as a reliable test) there is something about doing so that is bothersome to us mere mortals.
A more typical use is to take a given string, produce the checksum and then verify the computed checksum to a published value. This ensures that the string you are working with is authentic. You normally see this in many download sites where you can download the object and the publisher also publishes a checksum of what they published. ?>
|
| |
|
| |
|
|
|
|
|
|
|
|
Top Sponsor
Sponsors
Sponsors
Advertisting
Affiliates
|
|