use crate::CryptoError;
pub trait Kem {
type EncapKey;
type DecapKey;
type Ciphertext;
type SharedSecret: AsRef<[u8]>;
#[must_use = "result must be checked"]
fn kem_generate() -> Result<(Self::DecapKey, Self::EncapKey), CryptoError>;
#[must_use = "result must be checked"]
fn kem_encapsulate(
ek: &Self::EncapKey,
) -> Result<(Self::Ciphertext, Self::SharedSecret), CryptoError>;
#[must_use = "result must be checked"]
fn kem_decapsulate(
dk: &Self::DecapKey,
ct: &Self::Ciphertext,
) -> Result<Self::SharedSecret, CryptoError>;
}