Crate cargo_cryptile

Crate cargo_cryptile 

Source
Expand description

Cryptile: CLI tool for Encrypting and Decrypting files with a password using AES256 encryption

§Example

use cargo_cryptile as cryptile;
use hmac_sha256::Hash;
 
let pass = "password";
let pass: Vec<u8> = (*pass).bytes().collect();
let key = Hash::hash(&pass);
 
cryptile::encrypt("test.txt", &key).unwrap();
cryptile::decrypt("test.txt.cryptile", &key).unwrap();

Modules§

benches

Constants§

FILE_EXTENSION

Functions§

decrypt
Function to decrypt a previously ecrypted file using the encrypt function Returns Result type
delete
Function to try to delete a file from filesystem to be called after encryption or decryption to delete the original file Ignores whether the delete operation fails or not
encrypt
Function to encrypt a file using a 32-bit key Returns Result type
is_correct_key
Function to determine whether a key is correct for an encrypted file Returns a Result<bool> type