Skip to content

Commit

Permalink
Merge pull request #85 from scombat/custom_hash_method
Browse files Browse the repository at this point in the history
Custom hash method
  • Loading branch information
Emre Akay committed Oct 28, 2015
2 parents ecb3ae3 + 825f535 commit 349bcad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Created by .gitignore support plugin (hsz.mobi)
.idea/
.idea/
7 changes: 6 additions & 1 deletion application/config/aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
| ['verification_link'] Link for verification without site_url or base_url
| ['reset_password_link'] Link for reset_password without site_url or base_url
|
| ['hash'] Name of selected hashing algorithm (e.g. "md5", "sha256", "haval160,4", etc..)
| Please, run hash_algos() for know your all supported algorithms
|
*/
$config_aauth = array();

Expand Down Expand Up @@ -115,7 +118,9 @@

'verification' => false,
'verification_link' => '/account/verification/',
'reset_password_link' => '/account/reset_password/'
'reset_password_link' => '/account/reset_password/',

'hash' => 'sha256'
);

$config['aauth'] = $config_aauth['default'];
Expand Down
2 changes: 1 addition & 1 deletion application/libraries/Aauth.php
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,7 @@ public function update_activity($user_id = FALSE) {
function hash_password($pass, $userid) {

$salt = md5($userid);
return hash('sha256', $salt.$pass);
return hash($this->config_vars['hash'], $salt.$pass);
}

########################
Expand Down

0 comments on commit 349bcad

Please sign in to comment.