pub trait Encapsulate<EK, SS> {
type Error: Debug;
// Required method
fn encapsulate<R>(&self, rng: &mut R) -> Result<(EK, SS), Self::Error>
where R: TryCryptoRng + ?Sized;
}Expand description
A value that can be encapsulated to. Often, this will just be a public key. However, it can also be a bundle of public keys, or it can include a sender’s private key for authenticated encapsulation.
Required Associated Types§
Required Methods§
Sourcefn encapsulate<R>(&self, rng: &mut R) -> Result<(EK, SS), Self::Error>where
R: TryCryptoRng + ?Sized,
fn encapsulate<R>(&self, rng: &mut R) -> Result<(EK, SS), Self::Error>where
R: TryCryptoRng + ?Sized,
Encapsulates a fresh shared secret
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.