Encrypt entire folders with a single command.
AES-256-CBC encryption for all files, recursively.
You have a folder of sensitive files and want to lock it down quickly. Encrypto walks the directory tree, encrypts every file with AES-256-CBC via OpenSSL, and removes the originals. One command, one password, done.
- 🔒 AES-256-CBC — industry-standard encryption via OpenSSL
- 📁 Recursive — encrypts all files in a directory and subdirectories
- 🛡️ Double confirmation — prompts for password twice to prevent typos
- 🚫 Skip-safe — won't double-encrypt files already ending in
.enc - 📂 Multi-folder — encrypt multiple directories in one command
Requires Rust and OpenSSL (pre-installed on macOS).
cargo build --release
cp target/release/encrypto ~/bin/# Encrypt a folder
encrypto -e -f ./secrets
# → prompts for password (hidden input)
# → encrypts all files, appends .enc, removes originals
# Decrypt it back
encrypto -d -f ./secrets
# → prompts for password
# → decrypts all .enc files, restores originals
# Multiple folders
encrypto -e -f ./folder1 ./folder2 ./folder3| Flag | Description |
|---|---|
-e, --encrypt |
Encrypt mode |
-d, --decrypt |
Decrypt mode |
-f, --folder-paths |
One or more folder paths |
Encrypto uses walkdir to traverse directories recursively. For each file, it shells out to OpenSSL:
openssl enc -aes-256-cbc -salt -in file.txt -out file.enc -pass pass:***
Encrypted files get the .enc suffix. On decryption, the suffix is stripped and the encrypted version is removed. A password backup is saved to ~/.encpass as a recovery mechanism.
Personal tool for quick folder encryption. Feel free to fork and adapt.