pub type Seed = [u8; 32];Expand description
The generic type for all seeds across our protocols.
Trait Implementations§
Source§impl DeriveRng for Seed
impl DeriveRng for Seed
Source§fn derive_new(&self, tag: &[u8]) -> Self
fn derive_new(&self, tag: &[u8]) -> Self
Derive new Seed from the current object
Source§fn derive_new_rng(&self, tag: &[u8]) -> ChaCha12Rng
fn derive_new_rng(&self, tag: &[u8]) -> ChaCha12Rng
Initializes a ChaCha12 RNG with the session ID as a seed.
Source§fn derive_new_custom_rng<Rng>(&self, tag: &[u8]) -> Rngwhere
Rng: CryptoRngCore + SeedableRng,
fn derive_new_custom_rng<Rng>(&self, tag: &[u8]) -> Rngwhere
Rng: CryptoRngCore + SeedableRng,
Derive a new seed using the tag and initialize a Rng
Source§fn derive_rng(&self) -> ChaCha12Rng
fn derive_rng(&self) -> ChaCha12Rng
Initializes a ChaCha12 RNG with the session ID as a seed.
Source§fn derive_custom_rng<Rng>(&self) -> Rngwhere
Rng: CryptoRngCore + SeedableRng,
fn derive_custom_rng<Rng>(&self) -> Rngwhere
Rng: CryptoRngCore + SeedableRng,
Initializes an RNG with the current seed.
This is useful for generating random values that are consistent across protocol runs.