pub trait CryptInit: Sized {
// Required methods
fn seed_len() -> usize;
fn initialize(seed: &[u8]) -> Result<Self>;
// Provided method
fn construct<K: KeyGenerator>(keygen: K) -> Result<Self> { ... }
}Expand description
Represents the ability for one hop of a circuit’s cryptographic state to be initialized from a given seed.
Required Methods§
Sourcefn initialize(seed: &[u8]) -> Result<Self>
fn initialize(seed: &[u8]) -> Result<Self>
Construct this state from a seed of the appropriate length.
Provided Methods§
Sourcefn construct<K: KeyGenerator>(keygen: K) -> Result<Self>
fn construct<K: KeyGenerator>(keygen: K) -> Result<Self>
Initialize this object from a key generator.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.