How raushan728/cfx works
CFX is a command-line utility for encrypting and decrypting individual files, with additional commands to inspect, verify, and clean up interrupted operations. The main workflow dispatches a command to its operation handler: encryption streams file data into a temporary CFX file, while decryption authenticates and streams data into a temporary output before finalizing it. The handlers use shared cryptography and format modules. The graph reflects the sampled Rust source and README; filesystem interactions are represented at a high level, and no external service is documented.
Main entry points: main.rs Command Router · format.rs CFX Format · encrypt.rs Encrypt · decrypt.rs Decrypt
Components 10
CLI Commands
- Command Router
src/main.rs
File Operations
- Encrypt
src/ops/encrypt.rs - Decrypt
src/ops/decrypt.rs - File Info
src/ops/info.rs - Verify Integrity
src/ops/verify.rs - Recover Temps
src/ops/recover.rs
Shared Internals
- Crypto Services
src/crypto.rs - CFX Format
src/format.rs
Other components
- CLI User
- Local Files
Connections 19
- CLI User → Command Router: runs command
src/main.rs - Command Router → Encrypt: dispatches
src/main.rs - Command Router → Decrypt: dispatches
src/main.rs - Command Router → File Info: dispatches
src/main.rs - Command Router → Verify Integrity: dispatches
src/main.rs - Command Router → Recover Temps: dispatches
src/main.rs - Encrypt → Crypto Services: uses encryption
src/ops/encrypt.rs - Encrypt → CFX Format: writes header
src/ops/encrypt.rs - Decrypt → Crypto Services: uses decryption
src/ops/decrypt.rs - Decrypt → CFX Format: reads header
src/ops/decrypt.rs - Verify Integrity → Crypto Services: authenticates chunks
src/ops/verify.rs - Verify Integrity → CFX Format: reads header
src/ops/verify.rs - File Info → CFX Format: reads header
src/ops/info.rs - Recover Temps → CFX Format: checks temp header
src/ops/recover.rs - Encrypt → Local Files: reads and writes
src/ops/encrypt.rs - Decrypt → Local Files: reads and writes
src/ops/decrypt.rs - File Info → Local Files: reads file
src/ops/info.rs - Verify Integrity → Local Files: reads file
src/ops/verify.rs - Recover Temps → Local Files: scans and deletes
src/ops/recover.rs