use libc::size_t;
use std::os::raw::c_void;
pub trait Random {
unsafe fn context(&mut self) -> *mut c_void;
unsafe extern "C" fn random_impl(
ctx: *mut c_void, length: size_t, dst: *mut u8,
);
fn random(&mut self, buf: &mut [u8]) {
unsafe {
Self::random_impl(self.context(), buf.len(), buf.as_mut_ptr());
}
}
}