[BUGFIX] Restructure the random byte generator
authorHelmut Hummel <helmut.hummel@typo3.org>
Tue, 29 Mar 2011 22:18:47 +0000 (00:18 +0200)
committerSteffen Gebert <steffen.gebert@typo3.org>
Mon, 24 Oct 2011 19:38:17 +0000 (21:38 +0200)
commit3580129688d0eae327e383d704dda822f3a0e4f5
tree25f033e8a8082257af0cf2caa962b334066265c3
parent6fcc5bcef0cb51f13b76ad81e4e118c4666f1990
[BUGFIX] Restructure the random byte generator

Restructure the code to use the most performant methods first
if available. Take specialities of Windows OS and special
PHP versions into account.

Read/ generate more bytes than needed in one call, because it
does not cost (much) more to generate more random bytes, but it's
much cheaper for the next calls, because the bytes are already there.

Resolves: #23355
Releases: 4.6, 4.5, 4.4

Change-Id: I6bad300842f3da40c620b3d79b8116345a2749a0
Reviewed-on: http://review.typo3.org/4537
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Steffen Gebert
Tested-by: Steffen Gebert
t3lib/class.t3lib_div.php
tests/t3lib/class.t3lib_divTest.php