random: Use modern Windows randomness functions
The old randomness API has been deprecated and may be removed soon.[^1] For reference on `BCryptGenRandom`, see: https://learn.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom. `STATUS_SUCCESS`[^2] gets defined here since including `ntstatus.h` is more trouble than it's worth. [^3] [^1]: https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptacquirecontextw & https://learn.microsoft.com/en-us/windows/win32/api/wincrypt/nf-wincrypt-cryptgenrandom [^2]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-erref/596a1078-e883-4972-9bbc-49e60bebca55 [^3]: See https://github.com/bitcoin-core/secp256k1/blob/70f149b9a1bf4ed3266f97774d0ae9577534bf40/examples/examples_util.h#L19-L28
This commit is contained in:
1 parent
31d3eebfb9
commit
6b4bcc1623
4 files changed
+12
-11
No files matched your search
@@ -153,7 +153,8 @@ MACHO_ALLOWED_LIBRARIES = {
|
||||
}
|
||||
|
||||
PE_ALLOWED_LIBRARIES = {
|
||||
'ADVAPI32.dll', # security & registry
|
||||
'ADVAPI32.dll', # legacy security & registry
|
||||
'bcrypt.dll', # newer security and identity API
|
||||
'IPHLPAPI.DLL', # IP helper API
|
||||
'KERNEL32.dll', # win32 base APIs
|
||||
'msvcrt.dll', # C standard library for MSVC
|
||||
|
||||
Reference in new issue
Block a user