Exemple #1
0
 /**
  * Take a raw password and convert it to the hashed format
  * 
  * @param string $password
  * 
  * @return hashed password
  */
 public static function hashPassword($password, $salt = null)
 {
     $salt = $salt !== null ? $salt : Caspar::getSalt();
     return crypt($password, '$2a$07$' . $salt . '$');
 }