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

search for in the

Fonctions Mhash> <Constantes pré-définies
[edit] Last updated: Fri, 25 May 2012

view this page in

Exemples

Exemple #1 Calcule le MD5 et le hmac, puis l'affiche comme un hexadécimal

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

L'exemple ci-dessus va afficher :

Le hash vaut d03cb659cbf9192dcd066272249f8412
Le hmac vaut 750c783e6ab0b503eaa86e310a5db738



add a note add a note User Contributed Notes Exemples
There are no user contributed notes for this page.

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