WhirlPool

Cryptography
User avatar
chokito
Posts: 10
Joined: Sun Oct 15, 2017 9:20 pm

WhirlPool

Postby chokito » Wed Aug 22, 2018 7:40 pm

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); ?>

Return to “Cryptography”