Skip to main content

encrypt_batch

Function encrypt_batch 

Source
pub fn encrypt_batch<M, R>(
    messages: &[M],
    public_key: &M::PublicKeyType,
    rng: &mut R,
) -> Result<Vec<M::EncryptedType>, BatchError>
Expand description

Polymorphic batch encryption.

Encrypts a slice of unencrypted messages with a session public key.

§Examples

let encrypted = encrypt_batch(&messages, &public_key, &mut rng)?;