Re: unify entropy source for all php related functions
| From: | Pierre Joye | Date: | Fri, 07 Feb 2014 11:55:10 +0000 |
| Subject: | Re: unify entropy source for all php related functions | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-72380@lists.php.net to get a copy of this message | ||
On Fri, Feb 7, 2014 at 12:53 PM, Pádraic Brady <padraic.brady@gmail.com> wrote:
> In principle, that makes a lot of sense. It beats wondering what each
> different function is using under the covers and may even simplify
> userland code a bit (and reduce some file checking if it can be relied
> upon).
Yes, both effects are part of the idea. It is useful in userland as
well as one can simply fopen one of them without worrying about it.
>> I am not willing to propose new RNG functions or extensions for 5.6 as
>> we have way too little time to actually discuss its design and APIs.
>> However having these settings unified and documented would be a good
>> step forward already.
>
> I think the end goal should be unification with some generalised API.
> At the moment we have mt_rand(), lcg_value(),
> openssl_random_pseudo_bytes(), mcrypt_create_iv() and then the file
> read approaches. They all have uses, but they sit in different places
> and extensions and it’s not always clear what each is best at. I agree
> that this would take a lot of time to work through.
Yes, something we can think about targeting 6 and cleanup all this mess :)
Cheers,
--
Pierre
@pierrejoye | http://www.libgd.org