Function encrypt_bytes

Source
pub fn encrypt_bytes(
    plaintext: &[u8],
    password: SecretString,
    opts: &EncryptOptions,
) -> Result<Vec<u8>, EncFileError>
Expand description

Encrypt a whole buffer and return the full file bytes (header + ciphertext).

When opts.armor == true, returns ASCII-armored data (Base64) instead of binary.