Home > Php, Programmazione e scripting > Usare mhash di PEAR in PHP

Usare mhash di PEAR in PHP

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

  1. Nessun commento ancora...
  1. Nessun trackback ancora...