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
Constants
Functions
Function to decrypt a previously ecrypted file using the
encrypt
function
Returns Result typeFunction 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
Function to encrypt a file using a 32-bit key
Returns Result type
Function to determine whether a key is correct for an encrypted file
Returns a
Result<bool>
type