Function encrypt_file

Source
pub fn encrypt_file(c: &Config) -> Result<(), Error>
Expand description

Encrypts a file using the options wrapped in a Config.

§Errors

Returns an Error::IoError if any of the I/O operations fail.

§Example

use onetime_cli::Config;
use onetime_cli::encrypt_file;
use onetime_cli::Error;

let c = Config::new("secret.txt");

let res = encrypt_file(&c)?;