Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:72380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 79595 invoked from network); 7 Feb 2014 11:55:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2014 11:55:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:64504] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/97-34013-0A9C4F25 for ; Fri, 07 Feb 2014 06:55:12 -0500 Received: by mail-qc0-f170.google.com with SMTP id e9so5726983qcy.29 for ; Fri, 07 Feb 2014 03:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=57wfo+2bgU/XsUx8+MXO4KjTx1AD3CUEl5phkEleA5w=; b=giGhfRGKWU8DPDzjX6miG+7OPV8sGt86+ffdCPprwXXcULtuZ6aeFzvl7E3zm/COlR t7ssuZJbkXMgqmXLUvU/S1DGICFw7vgiEhqQ+W+HkvkHbZLlJq25F+1to34IFV9M8Gwo kcEnw9nVc6pwrN6CQEcNcg6p4WCBIbbTQAME3+07yK6ipso7Q8MvuoLy2aDnRpBya3X6 g42ZTS8QEhe6wVvKr5Pk4gt6rVjuR/uMSB4RC15XA2I7UFuhta4z27FtMfwEmsU0OF+p 34inQTy8Pr0HpKUg7oVwlCfAPaFHq1gkllMz4qbYUSFImo9hEhDnn+Cj1yz/+yMheUSq igCA== MIME-Version: 1.0 X-Received: by 10.140.31.75 with SMTP id e69mr19932740qge.76.1391774110066; Fri, 07 Feb 2014 03:55:10 -0800 (PST) Received: by 10.140.18.145 with HTTP; Fri, 7 Feb 2014 03:55:10 -0800 (PST) In-Reply-To: References: Date: Fri, 7 Feb 2014 12:55:10 +0100 Message-ID: To: =?UTF-8?Q?P=C3=A1draic_Brady?= Cc: PHP internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] unify entropy source for all php related functions From: pierre.php@gmail.com (Pierre Joye) On Fri, Feb 7, 2014 at 12:53 PM, P=C3=A1draic Brady 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=E2=80=99s 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, --=20 Pierre @pierrejoye | http://www.libgd.org