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§
- decrypt
- Function to decrypt a previously ecrypted file using the
encryptfunction 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