Struct mbedtls::rng::HmacDrbg

source ·
pub struct HmacDrbg<'entropy> { /* private fields */ }

Implementations§

source§

impl<'entropy> HmacDrbg<'entropy>

source

pub fn new<F: EntropyCallback>( md_info: MdInfo, source: &'entropy mut F, additional_entropy: Option<&[u8]> ) -> Result<HmacDrbg<'entropy>>

source

pub fn from_buf(md_info: MdInfo, entropy: &[u8]) -> Result<HmacDrbg<'entropy>>

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<'entropy> Drop for HmacDrbg<'entropy>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'entropy> RngCallback for HmacDrbg<'entropy>

source§

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

source§

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

Auto Trait Implementations§

§

impl<'entropy> RefUnwindSafe for HmacDrbg<'entropy>

§

impl<'entropy> !Send for HmacDrbg<'entropy>

§

impl<'entropy> !Sync for HmacDrbg<'entropy>

§

impl<'entropy> Unpin for HmacDrbg<'entropy>

§

impl<'entropy> UnwindSafe for HmacDrbg<'entropy>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Fwhere F: RngCallback,

source§

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

source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.