pub fn encrypt_with_rng(
rng: &mut (impl CryptoRng + RngCore),
delegating_pk: &PublicKey,
plaintext: &[u8],
) -> Result<(Capsule, Box<[u8]>), EncryptionError>Expand description
Encrypts the given plaintext message using a DEM scheme,
and encapsulates the key for later reencryption.
Returns the KEM Capsule and the ciphertext.