Subversion-Projekte lars-tiefland.ci

Revision

Revision 2049 | Revision 2242 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 2049 Revision 2107
Zeile 133... Zeile 133...
133
		'sha384' => 48,
133
		'sha384' => 48,
134
		'sha512' => 64
134
		'sha512' => 64
135
	);
135
	);
Zeile 136... Zeile 136...
136
 
136
 
137
	/**
137
	/**
138
	 * mbstring.func_override flag
138
	 * mbstring.func_overload flag
139
	 *
139
	 *
140
	 * @var	bool
140
	 * @var	bool
141
	 */
141
	 */
Zeile 142... Zeile 142...
142
	protected static $func_override;
142
	protected static $func_overload;
Zeile 143... Zeile 143...
143
 
143
 
144
	// --------------------------------------------------------------------
144
	// --------------------------------------------------------------------
Zeile 159... Zeile 159...
159
		if ( ! $this->_drivers['mcrypt'] && ! $this->_drivers['openssl'])
159
		if ( ! $this->_drivers['mcrypt'] && ! $this->_drivers['openssl'])
160
		{
160
		{
161
			show_error('Encryption: Unable to find an available encryption driver.');
161
			show_error('Encryption: Unable to find an available encryption driver.');
162
		}
162
		}
Zeile 163... Zeile 163...
163
 
163
 
164
		isset(self::$func_override) OR self::$func_override = (extension_loaded('mbstring') && ini_get('mbstring.func_override'));
164
		isset(self::$func_overload) OR self::$func_overload = (extension_loaded('mbstring') && ini_get('mbstring.func_overload'));
Zeile 165... Zeile 165...
165
		$this->initialize($params);
165
		$this->initialize($params);
166
 
166
 
167
		if ( ! isset($this->_key) && self::strlen($key = config_item('encryption_key')) > 0)
167
		if ( ! isset($this->_key) && self::strlen($key = config_item('encryption_key')) > 0)
Zeile 909... Zeile 909...
909
	 * @param	string	$str
909
	 * @param	string	$str
910
	 * @return	int
910
	 * @return	int
911
	 */
911
	 */
912
	protected static function strlen($str)
912
	protected static function strlen($str)
913
	{
913
	{
914
		return (self::$func_override)
914
		return (self::$func_overload)
915
			? mb_strlen($str, '8bit')
915
			? mb_strlen($str, '8bit')
916
			: strlen($str);
916
			: strlen($str);
917
	}
917
	}
Zeile 918... Zeile 918...
918
 
918
 
Zeile 926... Zeile 926...
926
	 * @param	int	$length
926
	 * @param	int	$length
927
	 * @return	string
927
	 * @return	string
928
	 */
928
	 */
929
	protected static function substr($str, $start, $length = NULL)
929
	protected static function substr($str, $start, $length = NULL)
930
	{
930
	{
931
		if (self::$func_override)
931
		if (self::$func_overload)
932
		{
932
		{
933
			// mb_substr($str, $start, null, '8bit') returns an empty
933
			// mb_substr($str, $start, null, '8bit') returns an empty
934
			// string on PHP 5.3
934
			// string on PHP 5.3
935
			isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start);
935
			isset($length) OR $length = ($start >= 0 ? self::strlen($str) - $start : -$start);
936
			return mb_substr($str, $start, $length, '8bit');
936
			return mb_substr($str, $start, $length, '8bit');