Bug #24410 » 16837_v4.diff
t3lib/class.t3lib_div.php (Arbeitskopie) | ||
---|---|---|
}
|
||
if ($output === '' && version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
||
if (function_exists('mcrypt_create_iv')) {
|
||
$output = mcrypt_create_iv($count, MCRYPT_DEV_URANDOM);
|
||
} elseif (function_exists('openssl_random_pseudo_bytes')) {
|
||
// due to a bug in PHP <= 5.3.3 MCRYPT_DEV_URANDOM doesn't work reliable on Windows
|
||
// @see http://bugs.php.net/bug.php?id=52523
|
||
$source = (version_compare(PHP_VERSION, '5.3.4', '>=') ? MCRYPT_DEV_URANDOM : MCRYPT_RANDOM);
|
||
$iv = mcrypt_create_iv($count, $source);
|
||
if ($iv !== FALSE) {
|
||
$output = $iv;
|
||
}
|
||
}
|
||
if ($output === '' && function_exists('openssl_random_pseudo_bytes')) {
|
||
$isStrong = NULL;
|
||
$output = openssl_random_pseudo_bytes($count, $isStrong);
|
||
// skip ssl since it wasn't using the strong algo
|