diff options
| author | bors <bors@rust-lang.org> | 2024-02-25 14:18:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-02-25 14:18:46 +0000 |
| commit | 34aab623ddccd54636a9f6e630cb29af443c4680 (patch) | |
| tree | eb2765d2830935223e97bce9fd3a921b579deef0 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 26cd5d862e22c013ecb3396b177d3af80e95c836 (diff) | |
| parent | 843eaf2e71f9a1ae564c5d24ec69c7a0c29e4e53 (diff) | |
| download | rust-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
