@@ -24,35 +24,34 @@ use crate::sys::random as sys;
24
24
/// Platform | Source
25
25
/// -----------------------|---------------------------------------------------------------
26
26
/// Linux | [`getrandom`] or [`/dev/urandom`] after polling `/dev/random`
27
- /// Windows | [`ProcessPrng`]
28
- /// macOS and other UNIXes | [`getentropy`]
29
- /// other Apple platforms | `CCRandomGenerateBytes`
30
- /// ESP-IDF | [`esp_fill_random`]
31
- /// Fuchsia | [`cprng_draw`]
27
+ /// Windows | [`ProcessPrng`](https://learn.microsoft.com/en-us/windows/win32/seccng/processprng)
28
+ /// Apple | `CCRandomGenerateBytes`
29
+ /// DragonFly | [`arc4random_buf`](https://man.dragonflybsd.org/?command=arc4random§ion=ANY)
30
+ /// ESP-IDF | [`esp_fill_random`](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/random.html#_CPPv415esp_fill_randomPv6size_t)
31
+ /// FreeBSD | [`arc4random_buf`](https://man.freebsd.org/cgi/man.cgi?query=arc4random&apropos=0&sektion=0&manpath=FreeBSD+15.0-CURRENT&arch=default&format=html)
32
+ /// Fuchsia | [`cprng_draw`](https://fuchsia.dev/reference/syscalls/cprng_draw)
33
+ /// Haiku | `arc4random_buf`
34
+ /// Illumos | [`arc4random_buf`](https://www.illumos.org/man/3C/arc4random)
35
+ /// NetBSD | [`arc4random_buf`](https://man.netbsd.org/arc4random.3)
36
+ /// OpenBSD | [`arc4random_buf`](https://man.openbsd.org/arc4random.3)
37
+ /// Solaris | [`arc4random_buf`](https://docs.oracle.com/cd/E88353_01/html/E37843/arc4random-3c.html)
38
+ /// Vita | `arc4random_buf`
32
39
/// Hermit | `read_entropy`
33
40
/// Horizon | `getrandom` shim
34
41
/// Hurd, L4Re, QNX | `/dev/urandom`
35
- /// NetBSD before 10.0 | [`kern.arandom`]
36
42
/// Redox | `/scheme/rand`
37
- /// SGX | [`rdrand`]
43
+ /// SGX | [`rdrand`](https://en.wikipedia.org/wiki/RDRAND)
38
44
/// SOLID | `SOLID_RNG_SampleRandomBytes`
39
45
/// TEEOS | `TEE_GenerateRandom`
40
- /// UEFI | [`EFI_RNG_PROTOCOL`]
46
+ /// UEFI | [`EFI_RNG_PROTOCOL`](https://uefi.org/specs/UEFI/2.10/37_Secure_Technologies.html#random-number-generator-protocol)
41
47
/// VxWorks | `randABytes` after waiting for `randSecure` to become ready
42
- /// WASI | `random_get`
48
+ /// WASI | [ `random_get`](https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/docs.md#-random_getbuf-pointeru8-buf_len-size---result-errno)
43
49
/// ZKVM | `sys_rand`
44
50
///
45
51
/// **Disclaimer:** The sources used might change over time.
46
52
///
47
53
/// [`getrandom`]: https://www.man7.org/linux/man-pages/man2/getrandom.2.html
48
54
/// [`/dev/urandom`]: https://www.man7.org/linux/man-pages/man4/random.4.html
49
- /// [`ProcessPrng`]: https://learn.microsoft.com/en-us/windows/win32/seccng/processprng
50
- /// [`getentropy`]: https://pubs.opengroup.org/onlinepubs/9799919799/functions/getentropy.html
51
- /// [`esp_fill_random`]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/random.html#_CPPv415esp_fill_randomPv6size_t
52
- /// [`cprng_draw`]: https://fuchsia.dev/reference/syscalls/cprng_draw
53
- /// [`kern.arandom`]: https://man.netbsd.org/rnd.4
54
- /// [`rdrand`]: https://en.wikipedia.org/wiki/RDRAND
55
- /// [`EFI_RNG_PROTOCOL`]: https://uefi.org/specs/UEFI/2.10/37_Secure_Technologies.html#random-number-generator-protocol
56
55
#[ derive( Default , Debug , Clone , Copy ) ]
57
56
#[ unstable( feature = "random" , issue = "none" ) ]
58
57
pub struct DefaultRandomSource ;
0 commit comments