pub fn decrypt_file(c: &Config) -> Result<(), Error>
Expand description
Decrypts a file using the options wrapped in a Config
.
§Errors
Returns an Error
if:
- any of the I/O operations fail (
IoError
) - the two input files differ in length (
InvalidInput
)
§Example
use onetime_cli::Config;
use onetime_cli::decrypt_file;
use onetime_cli::Error;
let c = Config::new("secret.txt");
let res = decrypt_file(&c)?;