downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Mhash Functions> <Predefined Constants
[edit] Last updated: Fri, 24 Jun 2011

view this page in

Examples

Example #1 محاسبه MD5 و hmac و چاپ آن به عنوان hex

<?php
$input 
"what do ya want for nothing?";
$hash mhash(MHASH_MD5$input);
echo 
"The hash is " bin2hex($hash) . "<br />\n";
$hash mhash(MHASH_MD5$input"Jefe");
echo 
"The hmac is " bin2hex($hash) . "<br />\n";
?>

نتیجه زیر تولید خواهد شد:

The hash is d03cb659cbf9192dcd066272249f8412 
The hmac is 750c783e6ab0b503eaa86e310a5db738 



add a note add a note User Contributed Notes Examples - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites