Hashing
In php, you can generate md5 or sha1 hashes by using the md5() and sha1() functions respectively.
You can also use the hash() function which I believe is much quicker. This function is available in PHP 5 >= 5.1.2.
Anyway, to get a list of the available hashing algorithms, just execute the following code.
print_r(hash_algos());
?>
Once you've decided on an algorithm, let's use md5 for this example, execute the following command,
echo(hash("md5","String to hash"));
?>
You can also use hash_file() to find a hash of a file with similar syntax.
echo(hash_file("md5","/path/to/file.txt"));
?>
[Click to add or edit comments])
Please prepend comments below including a date