Seed

Type Alias Seed 

Source
pub type Seed = [u8; 32];
Expand description

The generic type for all seeds across our protocols.

Trait Implementations§

Source§

impl DeriveRng for Seed

Source§

fn derive_new(&self, tag: &[u8]) -> Self

Derive new Seed from the current object
Source§

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]) -> Rng

Derive a new seed using the tag and initialize a Rng
Source§

fn derive_rng(&self) -> ChaCha12Rng

Initializes a ChaCha12 RNG with the session ID as a seed.
Source§

fn derive_custom_rng<Rng>(&self) -> Rng

Initializes an RNG with the current seed. This is useful for generating random values that are consistent across protocol runs.