A fast, secure CLI tool for encrypting/decrypting files using AES-256-GCM. Demonstrates Rust's safety, performance, and CLI best practices with Clap, progress bars, and error handling.
- Encryption/Decryption: Handles files efficiently with streaming.
- Key Management: Generate random 32-byte hex keys or supply your own.
- Progress Bars: Visual feedback for operations via Indicatif.
- Tests: Unit and integration tests for key gen and roundtrip.
- Safe: Authenticated encryption; proper error handling with Anyhow.
| Operation | Time | Throughput |
|---|---|---|
| Encrypt | ~2s | ~500 MB/s |
| Decrypt | ~2s | ~450 MB/s |
- Language: Rust 1.75+
- Crypto: aes-gcm 0.10
- CLI: Clap 4.5
- Progress: Indicatif 0.17
- Utils: Anyhow, Hex
- Rust & Cargo (install via rustup.rs)
- Clone repo:
git clone https://github.com/Stephenthompson002/Rust-File-Encryptor.git - Enter dir:
cd Rust-File-Encryptor - Build:
cargo build --release - Binary:
./target/release/rust-file-encryptor
# Generate key
./rust-file-encryptor gen-key
# Encrypt (auto-gen key if omitted)
./rust-file-encryptor encrypt input.txt output.enc --key 0123456789abcdef...
# Decrypt
./rust-file-encryptor decrypt output.enc decrypted.txt --key 0123456789abcdef...
# Help
./rust-file-encryptor --helpRun cargo test for unit/integration tests.
- Password-based keys (Argon2).
- Directory support.
- Publish to crates.io.
MIT - see LICENSE.
Rust portfolio project. Star! 🚀


