pub(crate) 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.
Implementors§
impl<BC: BlkCipher> CryptInit for EtCipher<BC>
Available on crate feature
counter-galois-onion
only.impl<BC: BlkCipherEnc> CryptInit for Prf<BC>
Available on crate feature
counter-galois-onion
only.impl<EtBC, PrfBC> CryptInit for tor_proto::crypto::cell::cgo::CryptStatePair<EtBC, PrfBC>where
EtBC: BlkCipher,
PrfBC: BlkCipherEnc,
Available on crate feature
counter-galois-onion
only.impl<EtBC: BlkCipher, PrfBC: BlkCipherEnc> CryptInit for CryptState<EtBC, PrfBC>
Available on crate feature
counter-galois-onion
only.impl<EtBC: BlkCipher, PrfBC: BlkCipherEnc> CryptInit for Uiv<EtBC, PrfBC>
Available on crate feature
counter-galois-onion
only.