@@ 271-281 (lines=11) @@ | ||
268 | # in PHP would result in much worse performance and |
|
269 | # consequently in lower iteration counts and hashes that are |
|
270 | # quicker to crack (by non-PHP code). |
|
271 | if (PHP_VERSION >= '5') { |
|
272 | $hash = md5($salt.$password, true); |
|
273 | do { |
|
274 | $hash = md5($hash.$password, false); |
|
275 | } while (--$count); |
|
276 | } else { |
|
277 | $hash = pack('H*', md5($salt.$password)); |
|
278 | do { |
|
279 | $hash = pack('H*', md5($hash.$password)); |
|
280 | } while (--$count); |
|
281 | } |
|
282 | ||
283 | $output = substr($setting, 0, 12); |
|
284 | $output .= $this->encode64($hash, 16); |
@@ 73-83 (lines=11) @@ | ||
70 | * consequently in lower iteration counts and hashes that are |
|
71 | * quicker to crack (by non-PHP code). |
|
72 | */ |
|
73 | if (PHP_VERSION >= 5) { |
|
74 | $hash = md5($salt.$password, true); |
|
75 | do { |
|
76 | $hash = md5($hash.$password, true); |
|
77 | } while (--$count); |
|
78 | } else { |
|
79 | $hash = pack('H*', md5($salt.$password)); |
|
80 | do { |
|
81 | $hash = pack('H*', md5($hash.$password)); |
|
82 | } while (--$count); |
|
83 | } |
|
84 | ||
85 | $output = substr($setting, 0, 12); |
|
86 | $output .= $this->encode64($hash, 16); |