Örnekler

Örnek 1 - Bir dizgenin MD5 ve HMAC aşlarını hesaplayıp sonuçları birer onaltılık dizge olarak çıktılar

<?php
$girdi 
"what do ya want for nothing?";
$aş mhash(MHASH_MD5$girdi);
echo 
"MD5 aşı: " bin2hex($aş) . "<br />\n";
$aş mhash(MHASH_MD5$girdi"Jefe");
echo 
"HMAC aşı: " bin2hex($aş) . "<br />\n";
?>

Yukarıdaki örneğin çıktısı:

MD5 aşı: d03cb659cbf9192dcd066272249f8412
HMAC aşı: 750c783e6ab0b503eaa86e310a5db738

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top