diff options
author | Kyle Johnson <blyxx86@gmail.com> | 2012-10-05 11:51:31 +0200 |
---|---|---|
committer | Kyle Johnson <blyxx86@gmail.com> | 2012-10-05 11:51:31 +0200 |
commit | fad389699e2e851af09c1f4508646194c2f45660 (patch) | |
tree | 8a595af2bd1980e4a475f5db5f4ce9f7bc8cd170 /system/libraries | |
parent | ddb32da0e86510d7e68c5432a1657732a01b5d34 (diff) | |
parent | f20bca9e065751fc271cb650f9246073492eccea (diff) |
Fixed conflicts in changelog to reflect all changes.
Conflicts:
user_guide_src/source/changelog.rst
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Encrypt.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Encrypt.php b/system/libraries/Encrypt.php index 8ffd93aea..679609251 100644 --- a/system/libraries/Encrypt.php +++ b/system/libraries/Encrypt.php @@ -484,7 +484,7 @@ class CI_Encrypt { */ public function set_hash($type = 'sha1') { - $this->_hash_type = ($type !== 'sha1' && $type !== 'md5') ? 'sha1' : $type; + $this->_hash_type = in_array($type, hash_algos()) ? $type : 'sha1'; } // -------------------------------------------------------------------- @@ -497,7 +497,7 @@ class CI_Encrypt { */ public function hash($str) { - return ($this->_hash_type === 'sha1') ? sha1($str) : md5($str); + return hash($this->_hash_type, $str); } } |