pub struct Kt128Expander { /* private fields */ }Expand description
Expand a 256-bit seed (and optional domain) into an arbitrary-length byte stream via KT128.
Implementations§
Source§impl Kt128Expander
impl Kt128Expander
Sourcepub fn from_seed_32(domain: &'static [u8], seed: [u8; 32]) -> Self
pub fn from_seed_32(domain: &'static [u8], seed: [u8; 32]) -> Self
Create an expander from a 32-byte seed and domain label.
Sourcepub fn from_seed(domain: &'static [u8], seed: &[u8]) -> Self
pub fn from_seed(domain: &'static [u8], seed: &[u8]) -> Self
Create an expander from variable-length seed material and a domain label.
Sourcepub fn from_det_seed_32(seed: [u8; 32]) -> Self
pub fn from_det_seed_32(seed: [u8; 32]) -> Self
Create an expander using DOMAIN_LIBQ_DET_RNG and a 32-byte seed.
Sourcepub fn from_det_u64(seed: u64) -> Self
pub fn from_det_u64(seed: u64) -> Self
Create an expander using DOMAIN_LIBQ_DET_RNG and SplitMix64-expanded u64 seed material.
Sourcepub fn fill_bytes(&mut self, dest: &mut [u8])
pub fn fill_bytes(&mut self, dest: &mut [u8])
Fill dest with deterministic pseudorandom bytes.
Trait Implementations§
Source§impl Clone for Kt128Expander
impl Clone for Kt128Expander
Source§fn clone(&self) -> Kt128Expander
fn clone(&self) -> Kt128Expander
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for Kt128Expander
impl RefUnwindSafe for Kt128Expander
impl Send for Kt128Expander
impl Sync for Kt128Expander
impl Unpin for Kt128Expander
impl UnsafeUnpin for Kt128Expander
impl UnwindSafe for Kt128Expander
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