Struct tomcrypt_sys::ltc_prng_descriptor [] [src]

#[repr(C)]
pub struct ltc_prng_descriptor { pub name: *const c_char, pub export_size: c_int, pub start: Option<unsafe extern "C" fn(_: *mut prng_state) -> c_int>, pub add_entropy: Option<unsafe extern "C" fn(_: *const c_uchar, _: c_ulong, _: *mut prng_state) -> c_int>, pub ready: Option<unsafe extern "C" fn(_: *mut prng_state) -> c_int>, pub read: Option<unsafe extern "C" fn(_: *mut c_uchar, _: c_ulong, _: *mut prng_state) -> c_ulong>, pub done: Option<unsafe extern "C" fn(_: *mut prng_state) -> c_int>, pub pexport: Option<unsafe extern "C" fn(_: *mut c_uchar, _: *mut c_ulong, _: *mut prng_state) -> c_int>, pub pimport: Option<unsafe extern "C" fn(_: *const c_uchar, _: c_ulong, _: *mut prng_state) -> c_int>, pub test: Option<unsafe extern "C" fn() -> c_int>, }

PRNG descriptor

Fields

Name of the PRNG

size in bytes of exported state

Start a PRNG state @param prng [out] The state to initialize @return CRYPT_OK if successful

Add entropy to the PRNG @param in The entropy @param inlen Length of the entropy (octets)\ @param prng The PRNG state @return CRYPT_OK if successful

Ready a PRNG state to read from @param prng The PRNG state to ready @return CRYPT_OK if successful

Read from the PRNG @param out [out] Where to store the data @param outlen Length of data desired (octets) @param prng The PRNG state to read from @return Number of octets read

Terminate a PRNG state @param prng The PRNG state to terminate @return CRYPT_OK if successful

Export a PRNG state @param out [out] The destination for the state @param outlen [in/out] The max size and resulting size of the PRNG state @param prng The PRNG to export @return CRYPT_OK if successful

Import a PRNG state @param in The data to import @param inlen The length of the data to import (octets) @param prng The PRNG to initialize/import @return CRYPT_OK if successful

Self-test the PRNG @return CRYPT_OK if successful, CRYPT_NOP if self-testing has been disabled

Trait Implementations

impl Debug for ltc_prng_descriptor
[src]

[src]

Formats the value using the given formatter.

impl Copy for ltc_prng_descriptor
[src]

impl Clone for ltc_prng_descriptor
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more