Enabled bcrypt for passwords
This commit is contained in:
parent
7e632cf785
commit
524b124211
@ -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']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,6 @@
|
|||||||
|
|
||||||
return array(
|
return array(
|
||||||
'driver' => 'ORM',
|
'driver' => 'ORM',
|
||||||
'hash_method' => 'md5',
|
'hash_method' => 'bcrypt',
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
|
Reference in New Issue
Block a user