pub fn encapsulate<'shared_secret, R: CryptoRng + RngCore>(
    public_key: &PublicKey<'_>,
    shared_secret_buf: &'shared_secret mut [u8; 32],
    rng: &mut R
) -> (Ciphertext, SharedSecret<'shared_secret>)
Expand description

KEM Encapsulation.

Given a public key public_key, compute a shared key. The returned ciphertext should be sent back to the entity holding the secret key corresponding to public key given here, so they can compute the same shared key.