Hello All,

 

Just beginning to experiment with encryption using the mcrypt library and
I'm wondering if anyone can tell me if it's normal that the following code
always seems to return exactly the same value whenever executed on my
system:

 

                        $td =
mcrypt_module_open('rijndael-256','','cbc','');

                        srand((double) microtime() * 1000000); 

                        $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td),
MCRYPT_RAND);

 

I was under the impression that the value in $iv should be different each
time this code is called, but for some reason it isn't?

 

Any help appreciated.

 

Much warmth,

 

Murray

 <http://www.planetthoughtful.org/> http://www.planetthoughtful.org

Building a thoughtful planet,

One quirky comment at a time.

 

Reply via email to