mcrypt_enc_get_iv_size not working
- From: "Jon Slaughter" <Jon_Slaughter@xxxxxxxxxxx>
- Date: Thu, 31 May 2007 13:13:41 -0500
mcrypt_enc_get_iv_size is not randomizing the vector. I have tried to
randomize the seed in various ways but it always returns the same output.
My current code as follows:
for($i = 1; $i < 5; $i++)
{
list($usec, $sec) = explode(' ', microtime());
srand((float) $sec + ((float) $usec * 100000));
$iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($this->CryptRes),
MCRYPT_RAND);
echo $iv."<br/>\n";
}
It outputs the same string each time.
Any ideas?
Thanks,
Jon
.
- Follow-Ups:
- Re: mcrypt_enc_get_iv_size not working
- From: Jon Slaughter
- Re: mcrypt_enc_get_iv_size not working
- Prev by Date: Re: Variable substitution to replace switch
- Next by Date: Web Site
- Previous by thread: Collecting User Information
- Next by thread: Re: mcrypt_enc_get_iv_size not working
- Index(es):