Enabled bcrypt for passwords

This commit is contained in:
Deon George 2016-09-01 20:57:15 +10:00
parent 7e632cf785
commit 524b124211
2 changed files with 2 additions and 1 deletions

View File

@ -114,6 +114,7 @@ abstract class lnApp_Auth_ORM extends Kohana_Auth_ORM {
switch ($this->_config['hash_method']) { switch ($this->_config['hash_method']) {
case '' : return $str; case '' : return $str;
case 'md5': return md5($str); case 'md5': return md5($str);
case 'bcrypt': return password_hash($str,PASSWORD_BCRYPT);
default: return hash_hmac($this->_config['hash_method'], $str, $this->_config['hash_key']); default: return hash_hmac($this->_config['hash_method'], $str, $this->_config['hash_key']);
} }
} }

View File

@ -12,6 +12,6 @@
return array( return array(
'driver' => 'ORM', 'driver' => 'ORM',
'hash_method' => 'md5', 'hash_method' => 'bcrypt',
); );
?> ?>