diff options
Diffstat (limited to 'system/helpers/security_helper.php')
-rw-r--r-- | system/helpers/security_helper.php | 38 |
1 files changed, 3 insertions, 35 deletions
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php index 61ebf46f9..a4df65623 100644 --- a/system/helpers/security_helper.php +++ b/system/helpers/security_helper.php @@ -1,4 +1,4 @@ -<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); +<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** * CodeIgniter * @@ -67,22 +67,6 @@ if ( ! function_exists('sanitize_filename')) /** * Hash encode a string * - * This is simply an alias for do_hash() - * dohash() is now deprecated - */ -if ( ! function_exists('dohash')) -{ - function dohash($str, $type = 'sha1') - { - return do_hash($str, $type); - } -} - -// -------------------------------------------------------------------- - -/** - * Hash encode a string - * * @access public * @param string * @return string @@ -93,23 +77,7 @@ if ( ! function_exists('do_hash')) { if ($type == 'sha1') { - if ( ! function_exists('sha1')) - { - if ( ! function_exists('mhash')) - { - require_once(BASEPATH.'libraries/Sha1'.EXT); - $SH = new CI_SHA; - return $SH->generate($str); - } - else - { - return bin2hex(mhash(MHASH_SHA1, $str)); - } - } - else - { - return sha1($str); - } + return sha1($str); } else { @@ -151,7 +119,7 @@ if ( ! function_exists('encode_php_tags')) { function encode_php_tags($str) { - return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('<?php', '<?PHP', '<?', '?>'), $str); + return str_replace(array('<?php', '<?PHP', '<?', '?>'), array('<?php', '<?PHP', '<?', '?>'), $str); } } |