Home
last modified time | relevance | path

Searched refs:getrandom (Results 1 - 25 of 56) sorted by relevance

123

/third_party/rust/crates/os_str_bytes/tests/
H A Drandom.rs6 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 Drandom_common.rs11 use getrandom::getrandom;
19 ) -> Result<OsString, getrandom::Error> {
23 getrandom(&mut buffer)?;
38 getrandom(as_mut_bytes(&mut buffer))?;
H A Draw_random.rs11 fn test_complex() -> Result<(), getrandom::Error> { in test_complex()
/third_party/rust/crates/rustix/src/rand/
H A Dmod.rs4 mod getrandom; modules
7 pub use getrandom::{getrandom, GetRandomFlags};
H A Dgetrandom.rs6 /// `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 Dsyscalls.rs7 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 Dgetrandom.rs1 use rustix::rand::{getrandom, GetRandomFlags};
6 let _ = getrandom(&mut buf, GetRandomFlags::empty()); in test_getrandom()
H A Dmain.rs9 mod getrandom; modules
/third_party/rust/crates/rustix/src/backend/libc/
H A Dmod.rs105 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 Drandom.h14 ssize_t getrandom(void *, size_t, unsigned);
/third_party/musl/porting/uniproton/kernel/include/sys/
H A Drandom.h14 ssize_t getrandom(void *, size_t, unsigned);
/third_party/musl/porting/liteos_m_iccarm/kernel/include/sys/
H A Drandom.h14 ssize_t getrandom(void *, size_t, unsigned);
/third_party/musl/src/linux/
H A Dgetrandom.c4 ssize_t getrandom(void *buf, size_t buflen, unsigned flags) in getrandom() function
/third_party/musl/libc-test/src/functionalext/supplement/linux/
H A Dgetrandom.c24 * @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 Dlibc_random.cpp23 benchmark::DoNotOptimize(getrandom(&i, sizeof(i), 0)); in Bm_function_Getrandom()
/third_party/musl/include/sys/
H A Drandom.h15 ssize_t getrandom(void *, size_t, unsigned);
/third_party/musl/src/misc/
H A Dgetentropy.c20 ret = getrandom(pos, len, 0); in getentropy()
/third_party/musl/libc-test/src/functionalext/supplement/linux/linux_gtest/
H A Dlinux_getrandom_test.cpp14 * @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 DRandGen.h18 #define MY_RAND_GEN(data, size) getrandom(data, size, 0)
/third_party/musl/porting/linux/user/ldso/
H A Ddynlink_rand.c99 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 Ddynlink_rand.c99 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 Drand_xor.c72 ssize_t ret = getrandom(seed, seed_size, GRND_NONBLOCK); in s_rand_xorshift128plus()
/third_party/eudev/src/shared/
H A Drandom-util.c46 /* 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 Dcoap_prng.c69 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 Dbootstrap_hash.c73 /* 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...]

Completed in 8 milliseconds

123