mhash function

mhash function

mhash
The mhash library provides an easy way to access strong hashes, such as MD5, SHA1, and other algorithms.
Mhash can be used to create checksums, message digests, message authentication codes, and more.

Syntax:
mhash(hash function, string input)
here,

hase function- Such as MHASH_MD5 ,MHASH_SHA1 etc.
input - String to find hash.

example:
<?php
$pass = “password”;
$hash = mhash (MHASH_MD5, $pass);
print “The hash is “.bin2hex ($hash);
?>

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.