From 524b124211e6a2b108d5056e9ae48e4898921410 Mon Sep 17 00:00:00 2001 From: Deon George Date: Thu, 1 Sep 2016 20:57:15 +1000 Subject: [PATCH] Enabled bcrypt for passwords --- classes/lnApp/Auth/ORM.php | 1 + config/auth.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/lnApp/Auth/ORM.php b/classes/lnApp/Auth/ORM.php index 2d94c99..592431d 100644 --- a/classes/lnApp/Auth/ORM.php +++ b/classes/lnApp/Auth/ORM.php @@ -114,6 +114,7 @@ abstract class lnApp_Auth_ORM extends Kohana_Auth_ORM { switch ($this->_config['hash_method']) { case '' : return $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']); } } diff --git a/config/auth.php b/config/auth.php index 3cfc2d4..21d8a5c 100644 --- a/config/auth.php +++ b/config/auth.php @@ -12,6 +12,6 @@ return array( 'driver' => 'ORM', - 'hash_method' => 'md5', + 'hash_method' => 'bcrypt', ); ?>