encrypt

Function encrypt 

Source
pub fn encrypt<G, KP, S, P>(
    generator: &mut G,
    public: &P,
    auth_data: &[u8],
    plain: &[u8],
) -> Result<Vec<u8>, Error>
where G: RandomKeyPairGenerator<KeyPair = KP, Error = Error>, KP: KeyPair<Secret = S, Public = P>, S: SecretKey, P: AsRef<[u8]>,
Expand description

Encrypt a message with a public key, writing an HMAC covering both the plaintext and authenticated data.

Authenticated data may be empty.