Archivio

Posts Tagged ‘pear’

Usare mhash di PEAR in PHP

19 settembre 2009 loade Nessun commento

Per utilizzare le funzioni mhash utilizzando l’archivio software di PEAR basta scaricare il file mhash.php e includerlo nei vostri script PHP.

Di seguito riporto un semplice esempio per testare l’utilizzo di mhash:

require_once(’/path/file/mhash.php’);

$input = “Prova Hash”;
$hash = mhash(MHASH_MD5, $input);

echo “Il suo hash ” . bin2hex($hash) . “\n”;

Per approfondimenti:

Pear

PHP

Source file