Trait nettle::random::Random[][src]

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]) { ... } }

A cryptographic random number generator.

Required methods

unsafe fn context(&mut self) -> *mut c_void[src]

Returns a pointer to the opaque CRNG state.

unsafe extern "C" fn random_impl(ctx: *mut c_void, length: size_t, dst: *mut u8)[src]

Fills the buffer dst with length random bytes, advancing the CRNG state ctx.

Loading content...

Provided methods

fn random(&mut self, buf: &mut [u8])[src]

Fills the buffer random with random bytes.

Loading content...

Implementors

impl Random for Yarrow[src]

Loading content...