PHP-Logo
Druckansicht von http://www.php-homepage.de/manual/mhash.examples.php

PHP-Logo
[ Main Menue ]
Homepage
Downloads
Artikel
Scripts
Forum
PHP-Manual
Links
News
Freelancer
Bücher
RuDolF
Suche
Misc
Über diese Seite
Kontakt
Wunschzettel
MyGuestbook
*
[ Suche ]
*
[ Manual ]
*

Follow on Twitter - @phphomepage

RSS Feed blogoscoop
 Vordefinierte Konstanten  Letztes Update:
18.05.2012
Mhash Funktionen 

Beispiele

Beispiel #1 Computes the MD5 digest and hmac and print it out as 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";
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

The hash is d03cb659cbf9192dcd066272249f8412 
The hmac is 750c783e6ab0b503eaa86e310a5db738 

© Copyright 1999 - 2011 by Mark Kronsbein | Impressum | NutzungsbedingungenWeiterempfehlen | Seitenanfang
0.0201