- bin2hex: documentation ( source)
- hash_hmac: documentation ( source)
<?php
$mac = hash_hmac("sha512","Un message suffisamment long pour tomber dans le cas du calcul du hashmac5uc3m01","7h3_1337_k3y",true);
$msg=3;
print(bin2hex($mac));
$msg=eval("return bin2hex($mac);");
print($msg);