note 49313 added to function.mt-rand

From: Date: Sun, 23 Jan 2005 23:47:14 +0000
Subject: note 49313 added to function.mt-rand
Groups: php.notes 
Request: Send a blank email to php-notes+get-83841@lists.php.net to get a copy of this message
Running the output of Mersenne Twister through an unkeyed secure hash is NOT a good way to make it secure, because it'll still have a relatively small internal state which, if recovered, would allow reproduction of the keystream. A better idea would be to encrypt the output with a keyed encryption algorithm - but if you were going to do that, you wouldn't need a psuedorandom number generator at all, because a counter would be just as good. ---- Manual Page -- http://www.php.net/manual/en/function.mt-rand.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49313 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49313&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49313&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49313&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49313&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49313&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49313&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#83841) next »