encrypt_to_vec

Function encrypt_to_vec 

Source
pub fn encrypt_to_vec(
    src: &[u8],
    _key: &[u8],
    _iv: &[u8],
    algo: EncryptionAlgorithm,
) -> Result<Vec<u8>, EncryptError>
Expand description

Encrypts src with IV to a new Vec. Can be used for both encryption and decryption.

IV: - EncryptionAlgorithm::Aes: IV is of AES block size. - EncryptionAlgorithm::None: IV is ignored.