/third_party/rust/crates/os_str_bytes/tests/ |
H A D | random.rs | 6 use getrandom::getrandom; 20 fn test_bytes() -> Result<(), getrandom::Error> { in test_bytes() 29 fn test_vec() -> Result<(), getrandom::Error> { in test_vec() 38 fn test_lossless() -> Result<(), getrandom::Error> { in test_lossless() 41 getrandom(&mut string)?; in test_lossless()
|
H A D | random_common.rs | 11 use getrandom::getrandom; 19 ) -> Result<OsString, getrandom::Error> { 23 getrandom(&mut buffer)?; 38 getrandom(as_mut_bytes(&mut buffer))?;
|
H A D | raw_random.rs | 11 fn test_complex() -> Result<(), getrandom::Error> { in test_complex()
|
/third_party/rust/crates/rustix/src/rand/ |
H A D | mod.rs | 4 mod getrandom; modules 7 pub use getrandom::{getrandom, GetRandomFlags};
|
H A D | getrandom.rs | 6 /// `getrandom(buf, flags)`—Reads a sequence of random bytes. 9 /// users should prefer to use [`getrandom`] or [`rand`] APIs instead. 11 /// [`getrandom`]: https://crates.io/crates/getrandom 17 /// [Linux]: https://man7.org/linux/man-pages/man2/getrandom.2.html 19 pub fn getrandom(buf: &mut [u8], flags: GetRandomFlags) -> io::Result<usize> { in getrandom() functions 20 backend::rand::syscalls::getrandom(buf, flags) in getrandom()
|
/third_party/rust/crates/rustix/src/backend/libc/rand/ |
H A D | syscalls.rs | 7 pub(crate) fn getrandom(buf: &mut [u8], flags: GetRandomFlags) -> io::Result<usize> { 8 // `getrandom` wasn't supported in glibc until 2.25. 10 fn getrandom(buf: *mut c::c_void, buflen: c::size_t, flags: c::c_uint) via SYS_getrandom -> c::ssize_t in getrandom() functions 14 unsafe { ret_ssize_t(getrandom(buf.as_mut_ptr().cast(), buf.len(), flags.bits()))? }; in getrandom()
|
/third_party/rust/crates/rustix/tests/rand/ |
H A D | getrandom.rs | 1 use rustix::rand::{getrandom, GetRandomFlags}; 6 let _ = getrandom(&mut buf, GetRandomFlags::empty()); in test_getrandom()
|
H A D | main.rs | 9 mod getrandom; modules
|
/third_party/rust/crates/rustix/src/backend/libc/ |
H A D | mod.rs | 105 weak! { fn getrandom(*mut c::c_void, c::size_t, c::c_uint) -> c::ssize_t } 107 // glibc 2.25 has `getrandom`, which is how we satisfy the API contract of 109 getrandom.get().is_none()
|
/third_party/musl/porting/liteos_m/kernel/include/sys/ |
H A D | random.h | 14 ssize_t getrandom(void *, size_t, unsigned);
|
/third_party/musl/porting/uniproton/kernel/include/sys/ |
H A D | random.h | 14 ssize_t getrandom(void *, size_t, unsigned);
|
/third_party/musl/porting/liteos_m_iccarm/kernel/include/sys/ |
H A D | random.h | 14 ssize_t getrandom(void *, size_t, unsigned);
|
/third_party/musl/src/linux/ |
H A D | getrandom.c | 4 ssize_t getrandom(void *buf, size_t buflen, unsigned flags) in getrandom() function
|
/third_party/musl/libc-test/src/functionalext/supplement/linux/ |
H A D | getrandom.c | 24 * @tc.desc : Verify getrandom process success 31 int32_t ret = getrandom(&tmp, sizeof(unsigned int), GRND_NONBLOCK); in getrandom_0100()
|
/third_party/musl/Benchmark/musl/ |
H A D | libc_random.cpp | 23 benchmark::DoNotOptimize(getrandom(&i, sizeof(i), 0)); in Bm_function_Getrandom()
|
/third_party/musl/include/sys/ |
H A D | random.h | 15 ssize_t getrandom(void *, size_t, unsigned);
|
/third_party/musl/src/misc/ |
H A D | getentropy.c | 20 ret = getrandom(pos, len, 0); in getentropy()
|
/third_party/musl/libc-test/src/functionalext/supplement/linux/linux_gtest/ |
H A D | linux_getrandom_test.cpp | 14 * @tc.desc: This test verifies whether the getrandom function in Linux can successfully generate a non blocking random 21 int32_t result = getrandom(&randomValue, sizeof(unsigned int), GRND_NONBLOCK); in HWTEST_F()
|
/third_party/lzma/CPP/7zip/Crypto/ |
H A D | RandGen.h | 18 #define MY_RAND_GEN(data, size) getrandom(data, size, 0)
|
/third_party/musl/porting/linux/user/ldso/ |
H A D | dynlink_rand.c | 99 if (getrandom(&handle, sizeof handle, GRND_RANDOM | GRND_NONBLOCK) == -1) { in gen_handle() 216 if (getrandom(&index, sizeof index, GRND_RANDOM | GRND_NONBLOCK) == -1) { in shuffle_loadtasks()
|
/third_party/musl/ldso/linux/ |
H A D | dynlink_rand.c | 99 if (getrandom(&handle, sizeof handle, GRND_RANDOM | GRND_NONBLOCK) == -1) { in gen_handle() 221 if (getrandom(&index, sizeof index, GRND_NONBLOCK) == -1) { in shuffle_loadtasks()
|
/third_party/mesa3d/src/util/ |
H A D | rand_xor.c | 72 ssize_t ret = getrandom(seed, seed_size, GRND_NONBLOCK); in s_rand_xorshift128plus()
|
/third_party/eudev/src/shared/ |
H A D | random-util.c | 46 /* Use the getrandom() syscall unless we know we don't have in dev_urandom() 49 r = getrandom(p, n, GRND_NONBLOCK); in dev_urandom()
|
/third_party/libcoap/src/ |
H A D | coap_prng.c | 69 return (getrandom(buf, len, 0) > 0) ? 1 : 0; in coap_prng_default() 130 /* No seed to seed the random source if getrandom() is used */ in coap_prng_init()
|
/third_party/python/Python/ |
H A D | bootstrap_hash.c | 73 /* Call getrandom() to get random bytes: 76 - Return 0 if getrandom() is not available (failed with ENOSYS or EPERM), 77 or if getrandom(GRND_NONBLOCK) failed with EAGAIN (system urandom not 80 if getrandom() failed with EINTR, raise is non-zero and the Python signal 81 handler raised an exception, or if getrandom() failed with a different 84 getrandom() is retried if it failed with EINTR: interrupted by a signal. */ 88 /* Is getrandom() supported by the running kernel? Set to 0 if getrandom() in py_getrandom() 104 /* Issue #26735: On Solaris, getrandom() is limited to returning up in py_getrandom() 116 n = getrandom(des in py_getrandom() [all...] |