logo

Trait kem::Decapsulator[][src]

pub trait Decapsulator<EK: EncappedKey> {
    fn try_decap(
        &self,
        encapped_key: &EK
    ) -> Result<GenericArray<u8, EK::NSecret>, Error>; }
Expand description

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

Required methods

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

Implementors