Encapsulate

Trait Encapsulate 

Source
pub trait Encapsulate<EK, SS> {
    type Error: Debug;

    // Required method
    fn encapsulate(
        &self,
        rng: &mut impl CryptoRngCore,
    ) -> Result<(EK, SS), Self::Error>;
}
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§

Source

type Error: Debug

Encapsulation error

Required Methods§

Source

fn encapsulate( &self, rng: &mut impl CryptoRngCore, ) -> Result<(EK, SS), Self::Error>

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.

Implementors§