pub struct HmacSha512Drbg { /* private fields */ }Expand description
HMAC-DRBG (SHA-512) wrapper implementing DeterministicRng.
Implementations§
Source§impl HmacSha512Drbg
impl HmacSha512Drbg
Sourcepub fn new(
entropy: &[u8],
nonce: &[u8],
personalization: Option<&[u8]>,
) -> Result<Self, DrbgError>
pub fn new( entropy: &[u8], nonce: &[u8], personalization: Option<&[u8]>, ) -> Result<Self, DrbgError>
Instantiate DRBG from caller-provided entropy/nonce/personalization strings.
Trait Implementations§
Source§impl Debug for HmacSha512Drbg
impl Debug for HmacSha512Drbg
Source§impl DeterministicRng for HmacSha512Drbg
impl DeterministicRng for HmacSha512Drbg
Source§fn fill_bytes(&mut self, out: &mut [u8]) -> Result<(), DrbgError>
fn fill_bytes(&mut self, out: &mut [u8]) -> Result<(), DrbgError>
Fill
out with pseudorandom bytes.Source§fn reseed(
&mut self,
entropy: &[u8],
additional_input: Option<&[u8]>,
) -> Result<(), DrbgError>
fn reseed( &mut self, entropy: &[u8], additional_input: Option<&[u8]>, ) -> Result<(), DrbgError>
Reseed the generator with new entropy and optional additional input.
Source§fn set_reseed_interval(&mut self, interval: u64)
fn set_reseed_interval(&mut self, interval: u64)
Adjust the reseed interval (number of generate calls permitted before mandatory reseed).
Source§fn set_max_bytes_between_reseed(&mut self, bytes: u128)
fn set_max_bytes_between_reseed(&mut self, bytes: u128)
Adjust the byte budget that forces a reseed.
Source§impl Drop for HmacSha512Drbg
impl Drop for HmacSha512Drbg
Auto Trait Implementations§
impl Freeze for HmacSha512Drbg
impl RefUnwindSafe for HmacSha512Drbg
impl Send for HmacSha512Drbg
impl Sync for HmacSha512Drbg
impl Unpin for HmacSha512Drbg
impl UnwindSafe for HmacSha512Drbg
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more