aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2010-06-25 13:31:31 +0200
committerIgor Wiedler <igor@wiedler.ch>2010-12-28 22:36:25 +0100
commiteda9fbbb6363cad0f2035b7a1f9fafe27f23832b (patch)
treec023293935fd985b304c7047337fbbf236ea8644 /phpBB/includes/functions.php
parent1e59666ee32fb00c709644f1f66d3c0b662f32a0 (diff)
downloadforums-eda9fbbb6363cad0f2035b7a1f9fafe27f23832b.tar
forums-eda9fbbb6363cad0f2035b7a1f9fafe27f23832b.tar.gz
forums-eda9fbbb6363cad0f2035b7a1f9fafe27f23832b.tar.bz2
forums-eda9fbbb6363cad0f2035b7a1f9fafe27f23832b.tar.xz
forums-eda9fbbb6363cad0f2035b7a1f9fafe27f23832b.zip
[ticket/9574] Remove conditional PHP<5.2 code
There is a large amount of conditional code for PHP < 5.2 that can be removed with phpBB 3.1. PHPBB3-9574
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php22
1 files changed, 5 insertions, 17 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index b9c4bde1b7..48a9661347 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -394,7 +394,7 @@ function _hash_gensalt_private($input, &$itoa64, $iteration_count_log2 = 6)
}
$output = '$H$';
- $output .= $itoa64[min($iteration_count_log2 + ((PHP_VERSION >= 5) ? 5 : 3), 30)];
+ $output .= $itoa64[min($iteration_count_log2 + 5, 30)];
$output .= _hash_encode64($input, 6, $itoa64);
return $output;
@@ -480,24 +480,12 @@ function _hash_crypt_private($password, $setting, &$itoa64)
* consequently in lower iteration counts and hashes that are
* quicker to crack (by non-PHP code).
*/
- if (PHP_VERSION >= 5)
- {
- $hash = md5($salt . $password, true);
- do
- {
- $hash = md5($hash . $password, true);
- }
- while (--$count);
- }
- else
+ $hash = md5($salt . $password, true);
+ do
{
- $hash = pack('H*', md5($salt . $password));
- do
- {
- $hash = pack('H*', md5($hash . $password));
- }
- while (--$count);
+ $hash = md5($hash . $password, true);
}
+ while (--$count);
$output = substr($setting, 0, 12);
$output .= _hash_encode64($hash, 16, $itoa64);