Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115948 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41030 invoked from network); 4 Sep 2021 20:20:21 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 4 Sep 2021 20:20:21 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 28D7A1804B4 for ; Sat, 4 Sep 2021 13:57:09 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,HTML_MESSAGE, NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS35329 80.237.132.0/24 X-Spam-Virus: No X-Envelope-From: Received: from wp160.webpack.hosteurope.de (wp160.webpack.hosteurope.de [80.237.132.167]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 4 Sep 2021 13:57:08 -0700 (PDT) Received: from [2a02:8109:9d40:1d44:40b6:f5d3:c567:d46c] (helo=nas.fritz.box); authenticated by wp160.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1mMcio-0005LW-42; Sat, 04 Sep 2021 22:57:06 +0200 To: internals@lists.php.net References: Message-ID: Date: Sat, 4 Sep 2021 22:57:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------0BE063975DD47C5FAE13B0C0" Content-Language: en-US X-bounce-key: webpack.hosteurope.de;marc@mabe.berlin;1630789029;ff98da74; X-HE-SMSGID: 1mMcio-0005LW-42 Subject: Re: [PHP-DEV] [RFC] Random Extension 3.0 From: marc@mabe.berlin (Marc) --------------0BE063975DD47C5FAE13B0C0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 9/2/21 5:10 PM, Go Kudo wrote: > Hi Internals. > > Expanded from the previous RFC and changed it to an RFC that organizes the > whole PHP random number generator. Also, the target version has been > changed to 8.2. > > https://wiki.php.net/rfc/rng_extension > https://github.com/php/php-src/pull/7453 > > Hopefully you will get some good responses. For me (user land developer with no voting power) your RFC looks pretty :) Beside the abstract vs interface question I have some other notes: On the one hand you define "getBytes()" which returns a string and on the other hand you define "shuffleString()" - is the first one a binary string and the other a charset dependent string? I guess here "shuffleString()" works on byte level and so it should be "shuffleBytes()". Why are there no default values for min/max on "getInt()" - It seems unnecessary to me to pass min/max arguments if you are just interested in a random integer or passing max as well if you are interested in a positive integer only. Thanks for the nice RFC! > Regards, > Go Kudo Marc --------------0BE063975DD47C5FAE13B0C0--