Struct mbedtls::rng::CtrDrbg

source ·
#[repr(C)]
pub struct CtrDrbg { /* private fields */ }

Implementations§

source§

impl CtrDrbg

source

pub fn new<T: EntropyCallback + 'static>( entropy: Arc<T>, additional_entropy: Option<&[u8]> ) -> Result<Self>

source

pub fn with_mut_entropy<T: EntropyCallbackMut + 'static>( entropy: T, additional_entropy: Option<&[u8]> ) -> Result<Self>

source

pub fn prediction_resistance(&self) -> bool

source

pub fn set_prediction_resistance(&mut self, pr: bool)

source

pub fn entropy_len(&self) -> size_t

source

pub fn set_entropy_len(&mut self, len: size_t)

source

pub fn reseed_interval(&self) -> c_int

source

pub fn set_reseed_interval(&mut self, i: c_int)

source

pub fn reseed(&mut self, additional_entropy: Option<&[u8]>) -> Result<()>

source

pub fn update(&mut self, entropy: &[u8])

Trait Implementations§

source§

impl Drop for CtrDrbg

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a> Into<*const ctr_drbg_context> for &'a CtrDrbg

source§

fn into(self) -> *const ctr_drbg_context

Converts this type into the (usually inferred) input type.
source§

impl<'a> Into<*mut ctr_drbg_context> for &'a mut CtrDrbg

source§

fn into(self) -> *mut ctr_drbg_context

Converts this type into the (usually inferred) input type.
source§

impl RngCallback for CtrDrbg

source§

unsafe extern "C" fn call( user_data: *mut c_void, data: *mut c_uchar, len: size_t ) -> c_int
where Self: Sized,

source§

fn data_ptr(&self) -> *mut c_void

source§

impl RngCallbackMut for CtrDrbg

source§

unsafe extern "C" fn call_mut( user_data: *mut c_void, data: *mut c_uchar, len: size_t ) -> c_int
where Self: Sized,

source§

fn data_ptr_mut(&mut self) -> *mut c_void

source§

impl Send for CtrDrbg

source§

impl Sync for CtrDrbg

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<'r, F> Random for F
where F: RngCallback,

source§

fn random(&mut self, data: &mut [u8]) -> Result<()>
where Self: Sized,

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.