mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-10 23:50:38 +08:00
removed srand()
This commit is contained in:
@@ -55,7 +55,6 @@ class BaseSecurity
|
|||||||
{
|
{
|
||||||
$module = static::openCryptModule();
|
$module = static::openCryptModule();
|
||||||
$data = static::addPadding($data);
|
$data = static::addPadding($data);
|
||||||
srand();
|
|
||||||
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($module), MCRYPT_RAND);
|
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($module), MCRYPT_RAND);
|
||||||
$key = static::deriveKey($password, $iv);
|
$key = static::deriveKey($password, $iv);
|
||||||
mcrypt_generic_init($module, $key, $iv);
|
mcrypt_generic_init($module, $key, $iv);
|
||||||
|
|||||||
Reference in New Issue
Block a user