about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-02-25 14:18:46 +0000
committerbors <bors@rust-lang.org>2024-02-25 14:18:46 +0000
commit34aab623ddccd54636a9f6e630cb29af443c4680 (patch)
treeeb2765d2830935223e97bce9fd3a921b579deef0 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent26cd5d862e22c013ecb3396b177d3af80e95c836 (diff)
parent843eaf2e71f9a1ae564c5d24ec69c7a0c29e4e53 (diff)
downloadrust-34aab623ddccd54636a9f6e630cb29af443c4680.tar.gz
rust-34aab623ddccd54636a9f6e630cb29af443c4680.zip
Auto merge of #121337 - ChrisDenton:ProcessPrng, r=Mark-Simulacrum
Windows: Use ProcessPrng for random keys

Windows 10 introduced [`ProcessPrng`](https://learn.microsoft.com/en-us/windows/win32/seccng/processprng) for random number generation. This allows us to replace the overly complicated (and prone to failure) `BCryptGenRandom` with a documented function.

For the tier 3 Windows 7 target, we simply use the older `RtlGenRandom`, which is undocumented. It should be fine even on modern systems (for comparability reasons) as it's just a wrapper for `ProcessPrng`. However, it does require loading an extra intermediary DLL which we can avoid when we know we have Windows 10+.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions