encrypt

Function encrypt 

Source
pub fn encrypt(
    recipient: &impl Recipient,
    plaintext: &[u8],
) -> Result<Vec<u8>, EncryptError>
Expand description

Encrypts the given plaintext to the given recipient.

To encrypt to more than one recipient, use Encryptor::with_recipients.

This function returns binary ciphertext. To obtain an ASCII-armored text string, use encrypt_and_armor.