Commits

Pascal Kriete committed fae4036

Removing dohash and deprecating CI_SHA

Comments (0)

Files changed (1)

system/helpers/security_helper.php

 /**
  * 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
 	{
 		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
 		{