pub trait Decapsulate<EK, SS> {
type Encapsulator: Encapsulate<EK, SS>;
type Error: Debug;
// Required methods
fn decapsulate(&self, encapsulated_key: &EK) -> Result<SS, Self::Error>;
fn encapsulator(&self) -> Self::Encapsulator;
}Expand description
A value that can be used to decapsulate an encapsulated key.
Often, this will just be a secret key. But, as with Encapsulate, it can be a bundle
of secret keys, or it can include a sender’s private key for authenticated encapsulation.
Required Associated Types§
Sourcetype Encapsulator: Encapsulate<EK, SS>
type Encapsulator: Encapsulate<EK, SS>
Encapsulator which corresponds to this decapsulator.
Required Methods§
Sourcefn decapsulate(&self, encapsulated_key: &EK) -> Result<SS, Self::Error>
fn decapsulate(&self, encapsulated_key: &EK) -> Result<SS, Self::Error>
Decapsulates the given encapsulated key
Sourcefn encapsulator(&self) -> Self::Encapsulator
fn encapsulator(&self) -> Self::Encapsulator
Retrieve the encapsulator associated with this decapsulator.