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

From: Date: Tue, 30 Oct 2018 19:21:29 +0000
Subject: Req->Doc #77084 [Opn]: 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-16108@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: ab@php.net Reported by: mumu at seznam dot cz Summary: CryptGenRandom function used by random_int() and random_bytes() is deprecated Status: Open -Type: Feature/Change Request +Type: Documentation Problem Package: *General Issues Operating System: Windows PHP Version: 7.3.0RC4 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [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 (#16108) next »