Function openssl::crypto::symm::encrypt [] [src]

pub fn encrypt(t: Type, key: &[u8], iv: Option<&[u8]>, data: &[u8]) -> Result<Vec<u8>, ErrorStack>

Encrypts data, using the specified crypter type in encrypt mode with the specified key and iv; returns the resulting (encrypted) data.