[TYPO3-core] RFC #9852: Feature: Provide a random byte generator in TYPO3 Core

Christian Kuhn lolli at schwarzbu.ch
Sat Nov 29 09:12:02 CET 2008


Hi,


+1 on reading and testing.


I was a bit confused by the string access with $output{} and would
prefer $output[], but that is just personal taste.



+ // /dev/urandom is available on many *nix systems and is considered
+ // the best commonly available pseudo-random source.

On Linux /dev/random is considered the best PRNG [1], but it blocks if
entropy pool is empty. /dev/urandom reuses the internal entropy pool to
produce more pseudo-random bits, but the output may contain less entropy
than the corresponding read from /dev/random. A 'cat' on both devices
shows the difference.

On FreeBSD /dev/random never blocks.

Both devices are available in most Unixes.

Maybe we should note in the comment that /dev/random would be better,
but is not used in favor of a non blocking solution.


Regards
Christian


[1] http://en.wikipedia.org/wiki/Urandom


More information about the TYPO3-team-core mailing list