note 86702 rejected from function.mcrypt-create-iv by danbrown
| From: | danbrown@php.net | Date: | Thu, 30 Oct 2008 17:05:38 +0000 |
| Subject: | note 86702 rejected from function.mcrypt-create-iv by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-145974@lists.php.net to get a copy of this message | ||
Note Submitter: patrick dot janser at gmail dot com
----
I've also noticed some very long execution times for mcrypt_create_iv(), so I've used the
rand() function to generate an IV myself. What I noticed is that the execution time was almost
identical and not regular (less than 1 second and up to 30 seconds!).
I suppose the problem is in the randomise algorithm. The website is turning on a Linux server (I
don't know which distribution) with PHP 5.2.6 and Apache 2.0.
For the moment, I haven't got a stable solution. But as the IV is only generated on login, the
website isn't slowed down once the user is logged in (because I store IV in the session).
If someone has or knows a well implemented random function, it will interest me!