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

search for in the

Funciones de Mhash> <Constantes predefinidas
[edit] Last updated: Fri, 07 Jun 2013

view this page in

Ejemplos

Ejemplo #1 Calcula el MD5 y el hmac, y lo imprime como hexadecimal

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

El resultado del ejemplo serĂ­a:

El hash es d03cb659cbf9192dcd066272249f8412 
El hmac es 750c783e6ab0b503eaa86e310a5db738 



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

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