Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95964 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77367 invoked from network); 13 Sep 2016 01:14:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Sep 2016 01:14:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@ohgaki.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@ohgaki.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain ohgaki.net designates 180.42.98.130 as permitted sender) X-PHP-List-Original-Sender: yohgaki@ohgaki.net X-Host-Fingerprint: 180.42.98.130 ns1.es-i.jp Received: from [180.42.98.130] ([180.42.98.130:38782] helo=es-i.jp) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/C2-60695-7F257D75 for ; Mon, 12 Sep 2016 21:14:34 -0400 Received: (qmail 85634 invoked by uid 89); 13 Sep 2016 01:14:28 -0000 Received: from unknown (HELO mail-qk0-f169.google.com) (yohgaki@ohgaki.net@209.85.220.169) by 0 with ESMTPA; 13 Sep 2016 01:14:28 -0000 Received: by mail-qk0-f169.google.com with SMTP id w204so161203150qka.0 for ; Mon, 12 Sep 2016 18:14:27 -0700 (PDT) X-Gm-Message-State: AE9vXwN/OrL7BC7mNtrkWxv7HIHITtu2xR6S2rNY9OH8egz6iTIiw+S94mC8lwjQDmBwrvIu20pScTkj5CvA/w== X-Received: by 10.55.166.81 with SMTP id p78mr22953392qke.18.1473729262126; Mon, 12 Sep 2016 18:14:22 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.84.168 with HTTP; Mon, 12 Sep 2016 18:13:41 -0700 (PDT) In-Reply-To: <87h99lch13.fsf@lil.giraffy.jp> References: <878tuxenl4.fsf@lil.giraffy.jp> <87twdlcs2j.fsf@lil.giraffy.jp> <87h99lch13.fsf@lil.giraffy.jp> Date: Tue, 13 Sep 2016 10:13:41 +0900 X-Gmail-Original-Message-ID: Message-ID: To: Kazuo Oishi Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Improve uniqid() uniqueness From: yohgaki@ohgaki.net (Yasuo Ohgaki) Hi Kazuo, On Mon, Sep 12, 2016 at 11:46 PM, Kazuo Oishi wrote: >>> IMO, improving it (generate better semi-unique ID) is not important >>> enoungh to introduce unnecessary BC break. (Why returning string length >>> is changed?) >> >> It cannot not produce unique ID by default as name "uniqid()" implies. >> Reason is described in the RFC. Please read RFC because it's the >> official proposal. > > I had read it, of course. But I could not understand why you chose BC > break way. IMHO, 10 bits (about a million) entropy is not considered enough entropy, do you? How serious BC is? It's much less impact than using mt_rand() all over the code. i.e. rand() and mt_rand() is predictable random generator. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net