Merge pull request #405 from azet/master
document why RtlGenRandom is used
This commit is contained in:
commit
c3999056b5
@ -25,6 +25,12 @@
|
||||
#include "utils.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
/* `RtlGenRandom` is used over `CryptGenRandom` on Microsoft Windows based systems:
|
||||
* - `CryptGenRandom` requires pulling in `CryptoAPI` which causes unnecessary
|
||||
* memory overhead if no other Cryptography functionally is required.
|
||||
* - `RtlGenRandom` is thus called directly instead. A detailed explaination
|
||||
* can be found here: https://blogs.msdn.microsoft.com/michael_howard/2005/01/14/cryptographically-secure-random-number-on-windows-without-using-cryptoapi/
|
||||
*/
|
||||
# include <windows.h>
|
||||
# define RtlGenRandom SystemFunction036
|
||||
# if defined(__cplusplus)
|
||||
|
Loading…
Reference in New Issue
Block a user