在 2022-09-26 21:37, Alvin Wong via Mingw-w64-public 写道:

Now whether to use `RtlGenRandom` or `BCryptGenRandom` as the replacement: For UWP, 
`BCryptGenRandom` is the only choice. For desktop, a comment in a BoringSSL issue 
<https://bugs.chromium.org/p/boringssl/issues/detail?id=307#c9> claims that they both use 
"the same internal RNG infrastructure".

It seems we'd be better off replacing this use of `CryptGenRandom` with 
`RtlGenRandom` for desktop and `BCryptGenRandom` for UWP. Do you think this 
make sense?


Perhaps `rand_s()`, or even `QueryPerformanceCounter()` may be taken as a fallback. The latter never fails since Windows XP.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to