Code: Select all
<?php
define("PRE","1zA$");//Sel
define("POST","%yU1");
class Secure {
/**
* Crypt Password
* @param ClearText PW
* @return Crypted PW
*/
public static function hash($password){
return hash("whirlpool", PRE . $password . POST);
}
}
$hash1 = Secure::hash("mdp");
echo $hash1 . "<br \>" . strlen($hash1) . "<br \>";
$hash2 = Secure::hash("long password");
echo $hash2 . "<br \>" . strlen($hash2); ?>