summaryrefslogtreecommitdiffstats
path: root/system/core/compat
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/compat')
-rw-r--r--system/core/compat/hash.php6
-rw-r--r--system/core/compat/index.html2
-rw-r--r--system/core/compat/mbstring.php6
-rw-r--r--system/core/compat/password.php10
-rw-r--r--system/core/compat/standard.php50
5 files changed, 12 insertions, 62 deletions
diff --git a/system/core/compat/hash.php b/system/core/compat/hash.php
index 3fe3b85bc..8d03fa922 100644
--- a/system/core/compat/hash.php
+++ b/system/core/compat/hash.php
@@ -63,7 +63,7 @@ if ( ! function_exists('hash_equals'))
/**
* hash_equals()
*
- * @link http://php.net/hash_equals
+ * @link https://secure.php.net/hash_equals
* @param string $known_string
* @param string $user_string
* @return bool
@@ -109,7 +109,7 @@ if ( ! function_exists('hash_pbkdf2'))
/**
* hash_pbkdf2()
*
- * @link http://php.net/hash_pbkdf2
+ * @link https://secure.php.net/hash_pbkdf2
* @param string $algo
* @param string $password
* @param string $salt
@@ -206,8 +206,6 @@ if ( ! function_exists('hash_pbkdf2'))
'ripemd160' => 64,
'ripemd256' => 64,
'ripemd320' => 64,
- 'salsa10' => 64,
- 'salsa20' => 64,
'sha1' => 64,
'sha224' => 64,
'sha256' => 64,
diff --git a/system/core/compat/index.html b/system/core/compat/index.html
index b702fbc39..bcb7cae34 100644
--- a/system/core/compat/index.html
+++ b/system/core/compat/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html>
+<html lang="en">
<head>
<title>403 Forbidden</title>
</head>
diff --git a/system/core/compat/mbstring.php b/system/core/compat/mbstring.php
index 1c49d189e..7ec598d68 100644
--- a/system/core/compat/mbstring.php
+++ b/system/core/compat/mbstring.php
@@ -66,7 +66,7 @@ if ( ! function_exists('mb_strlen'))
* WARNING: This function WILL fall-back to strlen()
* if iconv is not available!
*
- * @link http://php.net/mb_strlen
+ * @link https://secure.php.net/mb_strlen
* @param string $str
* @param string $encoding
* @return int
@@ -93,7 +93,7 @@ if ( ! function_exists('mb_strpos'))
* WARNING: This function WILL fall-back to strpos()
* if iconv is not available!
*
- * @link http://php.net/mb_strpos
+ * @link https://secure.php.net/mb_strpos
* @param string $haystack
* @param string $needle
* @param int $offset
@@ -122,7 +122,7 @@ if ( ! function_exists('mb_substr'))
* WARNING: This function WILL fall-back to substr()
* if iconv is not available.
*
- * @link http://php.net/mb_substr
+ * @link https://secure.php.net/mb_substr
* @param string $str
* @param int $start
* @param int $length
diff --git a/system/core/compat/password.php b/system/core/compat/password.php
index 9937a47e8..3aae48576 100644
--- a/system/core/compat/password.php
+++ b/system/core/compat/password.php
@@ -68,7 +68,7 @@ if ( ! function_exists('password_get_info'))
/**
* password_get_info()
*
- * @link http://php.net/password_get_info
+ * @link https://secure.php.net/password_get_info
* @param string $hash
* @return array
*/
@@ -87,7 +87,7 @@ if ( ! function_exists('password_hash'))
/**
* password_hash()
*
- * @link http://php.net/password_hash
+ * @link https://secure.php.net/password_hash
* @param string $password
* @param int $algo
* @param array $options
@@ -142,7 +142,7 @@ if ( ! function_exists('password_hash'))
}
// Try not to waste entropy ...
- is_php('5.4') && stream_set_chunk_size($fp, 16);
+ stream_set_chunk_size($fp, 16);
$options['salt'] = '';
for ($read = 0; $read < 16; $read = ($func_overload) ? mb_strlen($options['salt'], '8bit') : strlen($options['salt']))
@@ -195,7 +195,7 @@ if ( ! function_exists('password_needs_rehash'))
/**
* password_needs_rehash()
*
- * @link http://php.net/password_needs_rehash
+ * @link https://secure.php.net/password_needs_rehash
* @param string $hash
* @param int $algo
* @param array $options
@@ -229,7 +229,7 @@ if ( ! function_exists('password_verify'))
/**
* password_verify()
*
- * @link http://php.net/password_verify
+ * @link https://secure.php.net/password_verify
* @param string $password
* @param string $hash
* @return bool
diff --git a/system/core/compat/standard.php b/system/core/compat/standard.php
index 18b1281ca..a6a1a9cee 100644
--- a/system/core/compat/standard.php
+++ b/system/core/compat/standard.php
@@ -62,7 +62,7 @@ if ( ! function_exists('array_column'))
/**
* array_column()
*
- * @link http://php.net/array_column
+ * @link https://secure.php.net/array_column
* @param array $array
* @param mixed $column_key
* @param mixed $index_key
@@ -133,51 +133,3 @@ if ( ! function_exists('array_column'))
return $result;
}
}
-
-// ------------------------------------------------------------------------
-
-if (is_php('5.4'))
-{
- return;
-}
-
-// ------------------------------------------------------------------------
-
-if ( ! function_exists('hex2bin'))
-{
- /**
- * hex2bin()
- *
- * @link http://php.net/hex2bin
- * @param string $data
- * @return string
- */
- function hex2bin($data)
- {
- if (in_array($type = gettype($data), array('array', 'double', 'object', 'resource'), TRUE))
- {
- if ($type === 'object' && method_exists($data, '__toString'))
- {
- $data = (string) $data;
- }
- else
- {
- trigger_error('hex2bin() expects parameter 1 to be string, '.$type.' given', E_USER_WARNING);
- return NULL;
- }
- }
-
- if (strlen($data) % 2 !== 0)
- {
- trigger_error('Hexadecimal input string must have an even length', E_USER_WARNING);
- return FALSE;
- }
- elseif ( ! preg_match('/^[0-9a-f]*$/i', $data))
- {
- trigger_error('Input string must be hexadecimal string', E_USER_WARNING);
- return FALSE;
- }
-
- return pack('H*', $data);
- }
-}