예제 #1
0
파일: User.php 프로젝트: thebuggenie/caspar
 /**
  * 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 . '$');
 }