encrypt_directory

Function encrypt_directory 

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

Encrypts a directory and outputs it to the specified output file

note: the output is a file but when you decrypt it, it will be a directory again it’s simply an encrypted tar file

§Examples

use simple_crypt::encrypt_directory;
use std::path::Path;

encrypt_directory(Path::new("example"), Path::new("example.dir"), b"example password").expect("Failed to encrypt directory");
// Now the example.dir is encrypted