[TYPO3-core] RFC #9852: Feature: Provide a random byte generator in TYPO3 Core
Marcus Krause
marcus#exp2008 at t3sec.info
Fri Nov 28 13:04:44 CET 2008
Dmitry Dulepov schrieb:
> Hi!
>
> Martin Kutschker wrote:
>> This could be the else-clause of the if-statement. Or is it meant to be
>> a fallback in case the fread failed or did not returned the number of
>> bytes requested? If so it should be documented.
>
> Yes, see in my patch in the other message.
>
>> Sidenote: is mt_rand() always available?
>
> Yes, both PHP4 and PHP5.
Yes it's a fallback and documented as such.
As Dmitry is using a similar implementation for OpenID, it's shows the
need for such function.
I will check which implementation (this patch or Dmitry's OpenID stuff)
provides a greater entropy.
9852_v2.diff has a small bug; $output has to be set to an empty string
before the /dev/urandom test as the fallback concats $output
Marcus.
More information about the TYPO3-team-core
mailing list