Doc #77084 [Opn->Csd]: CryptGenRandom function used by random_int() and random_bytes() is deprecated

From: Date: Wed, 31 Oct 2018 00:03:10 +0000
Subject: Doc #77084 [Opn->Csd]: CryptGenRandom function used by random_int() and random_bytes() is deprecated
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16109@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=77084&edit=1 ID: 77084 Updated by: cmb@php.net Reported by: mumu at seznam dot cz Summary: CryptGenRandom function used by random_int() and random_bytes() is deprecated -Status: Open +Status: Closed Type: Documentation Problem -Package: *General Issues +Package: Documentation problem Operating System: Windows PHP Version: 7.3.0RC4 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2018-10-31 00:01:31] cmb@php.net Automatic comment from SVN on behalf of cmb Revision: http://svn.php.net/viewvc/?view=revision&revision=345936 Log: Fix #77084: CryptGenRandom function used by random_int() and random_bytes() is deprecated ------------------------------------------------------------------------ [2018-10-30 19:21:29] ab@php.net Confirmed, the new API is used as of 7.2, see http://git.php.net/?p=php-src.git;a=blob;f=UPGRADING.INTERNALS;hb=refs/heads/PHP-7.2#l30. Thus, turning into doc issue. Thanks. ------------------------------------------------------------------------ [2018-10-30 18:11:44] mumu at seznam dot cz I have not studied the sources just the official docs at http://php.net/random_int. The page states: The sources of randomness used for this function are as follows: On Windows, CryptGenRandom() will always be used. ------------------------------------------------------------------------ [2018-10-30 18:03:35] ab@php.net Thanks for the report. Could you please point to the place where that deprecated APIs are used in 7.3? AFAIR php_get_random_bytes was moved to bcrypt at least in 7.2. Thanks. ------------------------------------------------------------------------ [2018-10-30 12:32:47] mumu at seznam dot cz Description: ------------ The Windows API CryptGenRandom function is marked as deprecated with suggestion to use Cryptography Next Generation API instead. Consider using the new API in a next PHP version. https://docs.microsoft.com/en-us/windows/desktop/api/wincrypt/nf-wincrypt-cryptgenrandom ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=77084&edit=1

« previous php.doc.bugs (#16109) next »