decrypt_directory

Function decrypt_directory 

Source
pub fn decrypt_directory(
    path: &Path,
    output_path: &Path,
    password: &[u8],
) -> Result<()>
Expand description

Decrypts a directory and extracts it to the specified output directory

note: the encrypted directory is a file but when its decrypted it will be a directory and the output path is not what the folder name should be its where to extract the file

ยงExamples

use simple_crypt::decrypt_directory;
use std::path::Path;

decrypt_directory(Path::new("example.dir"), Path::new("example"), b"example password").expect("Failed to decrypt directory");
// Now the example.txt is decrypted