Skip to content

Instantly share code, notes, and snippets.

@snowlong
Created May 26, 2015 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snowlong/ea07092238db99d7833a to your computer and use it in GitHub Desktop.
Save snowlong/ea07092238db99d7833a to your computer and use it in GitHub Desktop.
CakePHP 2.4 でパスワードのハッシュ化を行っているメソッド
/**
* Generates password hash.
*
* @param string $password Plain text password to hash.
* @return string Password hash
* @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#hashing-passwords
*/
public function hash($password) {
return Security::hash($password, $this->_config['hashType'], true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment