3 ms·
The recommendation for windows is hopelessly out of date. On Vista and up CryptGenRandom is exported directly from Advapi32. That said... just use the CNG funct
by leeter 10y ago
The recommendation for windows is hopelessly out of date. On Vista and up CryptGenRandom is exported directly from Advapi32. That said... just use the CNG functions (BCryptGenRandom[1]), which is what both RtlGenRandom and CryptGenRandom use under the covers. BCrypt.dll is going to get loaded either way.
[1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa375458(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...