Commit b6b7a8f2 by Qiang Xue

removed srand()

parent eaaf5f02
...@@ -55,7 +55,6 @@ class BaseSecurity ...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment