note 86702 added to function.mcrypt-create-iv

From: Date: Thu, 30 Oct 2008 16:54:47 +0000
Subject: note 86702 added to function.mcrypt-create-iv
Groups: php.notes 
Request: Send a blank email to php-notes+get-145973@lists.php.net to get a copy of this message
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! ---- Server IP: 69.147.83.197 Probable Submitter: 193.72.144.226 ---- Manual Page -- http://www.php.net/manual/en/function.mcrypt-create-iv.php Edit -- https://master.php.net/note/edit/86702 Del: integrated -- https://master.php.net/note/delete/86702/integrated Del: useless -- https://master.php.net/note/delete/86702/useless Del: bad code -- https://master.php.net/note/delete/86702/bad+code Del: spam -- https://master.php.net/note/delete/86702/spam Del: non-english -- https://master.php.net/note/delete/86702/non-english Del: in docs -- https://master.php.net/note/delete/86702/in+docs Del: other reasons-- https://master.php.net/note/delete/86702 Reject -- https://master.php.net/note/reject/86702 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#145973) next »