Sign in
rust
/
rust-lang
/
rust
/
refs/heads/try
/
.
/
library
/
std
/
src
/
sys
/
random
/
trusty.rs
blob: e4db24695f8bd9686a64b5d3e3fe612e283e0821 [
file
] [
log
] [
blame
]
unsafe
extern
"C"
{
fn
trusty_rng_secure_rand
(
randomBuffer
:
*
mut
core
::
ffi
::
c_void
,
randomBufferLen
:
libc
::
size_t
);
}
pub
fn
fill_bytes
(
bytes
:
&
mut
[
u8
])
{
unsafe
{
trusty_rng_secure_rand
(
bytes
.
as_mut_ptr
().
cast
(),
bytes
.
len
())
}
}