Trait sm9::Decapsulator

source ·
pub trait Decapsulator<EK>
where EK: EncappedKey,
{ // Required method fn try_decap(&self, encapped_key: &EK) -> Result<SharedSecret<EK>, Error>; }
Expand description

Represents the functionality of a key decapsulator, where Self is a cryptographic key.

Required Methods§

source

fn try_decap(&self, encapped_key: &EK) -> Result<SharedSecret<EK>, Error>

Attempt to decapsulate the given encapsulated key. Returns the shared secret on success, or an error if something went wrong.

Implementors§