encapsulate_boxed

Function encapsulate_boxed 

Source
pub fn encapsulate_boxed<R: CryptoRng + RngCore>(
    public_key: &PublicKey<'_>,
    rng: &mut R,
) -> (Ciphertext, SharedSecret<'static>)
Available on crate feature alloc only.
Expand description

Convenient wrapper around encapsulate that stores the shared secret on the heap and returns it with the 'static lifetime.