Use modern function for getting random numbers on Windows
commit3058158b69a80da13292c80ce46d95299b2fa609
authorChocobo1 <Chocobo1@users.noreply.github.com>
Thu, 12 Sep 2024 08:56:15 +0000 (12 16:56 +0800)
committerChocobo1 <Chocobo1@users.noreply.github.com>
Sat, 14 Sep 2024 15:20:07 +0000 (14 23:20 +0800)
tree1f00bab3cda29323f04eecf9b9a573da9259a27f
parentdbef6da54414d5d5dd345bbc41f307ef33b76be7
Use modern function for getting random numbers on Windows

The previous `RtlGenRandom()` just redirects to `ProcessPrng()` according to "The Windows 10
random number generation infrastructure" whitepaper from MS.

`ProcessPrng()` is also the de facto PRNG for Rust lang:
https://github.com/rust-random/getrandom/blob/aa13fa58821180248507b81c967d3c731a2ca1d5/src/windows.rs#L3C1-L22C81
And for golang:
https://go-review.googlesource.com/c/go/+/536235
src/base/utils/random.cpp