|
13 | 13 | //! | Target | Target Triple | Implementation
|
14 | 14 | //! | ----------------- | ------------------ | --------------
|
15 | 15 | //! | Linux, Android | `*‑linux‑*` | [`getrandom`][1] system call if available, otherwise [`/dev/urandom`][2] after successfully polling `/dev/random` |
|
16 |
| -//! | Windows | `*‑pc‑windows‑*` | [`RtlGenRandom`][3] | |
17 |
| -//! | [Windows UWP][22] | `*‑uwp‑windows‑*` | [`BCryptGenRandom`][23] | |
| 16 | +//! | Windows | `*‑pc‑windows‑*` | [`BCryptGenRandom`][3] | |
18 | 17 | //! | macOS | `*‑apple‑darwin` | [`getentropy()`][19] if available, otherwise [`/dev/random`][20] (identical to `/dev/urandom`)
|
19 | 18 | //! | iOS | `*‑apple‑ios` | [`SecRandomCopyBytes`][4]
|
20 | 19 | //! | FreeBSD | `*‑freebsd` | [`getrandom()`][21] if available, otherwise [`kern.arandom`][5]
|
|
121 | 120 | //!
|
122 | 121 | //! [1]: http://man7.org/linux/man-pages/man2/getrandom.2.html
|
123 | 122 | //! [2]: http://man7.org/linux/man-pages/man4/urandom.4.html
|
124 |
| -//! [3]: https://docs.microsoft.com/en-us/windows/desktop/api/ntsecapi/nf-ntsecapi-rtlgenrandom |
| 123 | +//! [3]: https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom |
125 | 124 | //! [4]: https://developer.apple.com/documentation/security/1399291-secrandomcopybytes?language=objc
|
126 | 125 | //! [5]: https://www.freebsd.org/cgi/man.cgi?query=random&sektion=4
|
127 | 126 | //! [6]: https://man.openbsd.org/getentropy.2
|
|
139 | 138 | //! [19]: https://www.unix.com/man-page/mojave/2/getentropy/
|
140 | 139 | //! [20]: https://www.unix.com/man-page/mojave/4/random/
|
141 | 140 | //! [21]: https://www.freebsd.org/cgi/man.cgi?query=getrandom&manpath=FreeBSD+12.0-stable
|
142 |
| -//! [22]: https://docs.microsoft.com/en-us/windows/uwp/ |
143 |
| -//! [23]: https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom |
144 | 141 |
|
145 | 142 | #![doc(
|
146 | 143 | html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
|
@@ -201,10 +198,8 @@ cfg_if! {
|
201 | 198 | } else if #[cfg(target_os = "vxworks")] {
|
202 | 199 | mod util_libc;
|
203 | 200 | #[path = "vxworks.rs"] mod imp;
|
204 |
| - } else if #[cfg(all(windows, target_vendor = "uwp"))] { |
205 |
| - #[path = "windows_uwp.rs"] mod imp; |
206 | 201 | } else if #[cfg(windows)] {
|
207 |
| - #[path = "windows.rs"] mod imp; |
| 202 | + #[path = "windows_uwp.rs"] mod imp; |
208 | 203 | } else if #[cfg(all(target_arch = "x86_64", target_env = "sgx"))] {
|
209 | 204 | #[path = "rdrand.rs"] mod imp;
|
210 | 205 | } else if #[cfg(all(feature = "rdrand",
|
|
0 commit comments