]>
git.proxmox.com Git - cargo.git/blob - vendor/openssl-0.9.15/src/rand.rs
7 pub fn rand_bytes(buf
: &mut [u8]) -> Result
<(), ErrorStack
> {
10 assert
!(buf
.len() <= c_int
::max_value() as usize);
11 cvt(ffi
::RAND_bytes(buf
.as_mut_ptr(), buf
.len() as c_int
)).map(|_
| ())
17 use super::rand_bytes
;
20 fn test_rand_bytes() {
21 let mut buf
= [0; 32];
22 rand_bytes(&mut buf
).unwrap();