Browse Source

Merge pull request #85 from scombat/custom_hash_method

Custom hash method
develop v2.4.5
Emre Akay 10 years ago
parent
commit
349bcad1a6
  1. 2
      .gitignore
  2. 7
      application/config/aauth.php
  3. 2
      application/libraries/Aauth.php

2
.gitignore vendored

@ -1,2 +1,2 @@
# Created by .gitignore support plugin (hsz.mobi)
.idea/
.idea/

7
application/config/aauth.php

@ -64,6 +64,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| ['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();
@ -115,7 +118,9 @@ $config_aauth["default"] = array(
'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'];

2
application/libraries/Aauth.php

@ -1145,7 +1145,7 @@ class Aauth {
function hash_password($pass, $userid) {
$salt = md5($userid);
return hash('sha256', $salt.$pass);
return hash($this->config_vars['hash'], $salt.$pass);
}
########################

Loading…
Cancel
Save