A versatile and secure command-line utility for encrypting and decrypting files of various formats using the Fernet symmetric encryption algorithm.
-
🔒 Strong Encryption & Decryption
Securely encrypt and decrypt any file with the powerful Fernet encryption algorithm. -
📂 Multi-format Support
Works with a wide range of file types — including.mp3,.jpeg,.png,.txt, and more. -
🛠 Command-Line Interface
Simple, script-friendly CLI design for quick use and seamless automation in your workflows. -
📁 Flexible I/O Options
Easily specify input and output paths to maintain full control over where your files go.
This tool uses Fernet encryption provided by the cryptography Python package. Fernet guarantees that a message encrypted using it cannot be manipulated or read without the key.
Make sure you have Python installed. Then, install the required package:
pip install cryptographypython encrypt_decrypt_tool.py encrypt input_file [--output_file OUTPUT_FILE]python encrypt_decrypt_tool.py decrypt input_file [--output_file OUTPUT_FILE]python encrypt_decrypt_tool.py encrypt secret.txt --output_file secret.encrypted
python encrypt_decrypt_tool.py decrypt secret.encrypted --output_file secret_decrypted.txtPreview.mp4
- Text files (
.txt) - Audio files (
.mp3) - Image files (
.jpeg,.png) - And virtually any other file type
Fernet is part of the Python cryptography library and ensures:
- Secure symmetric encryption (AES in CBC mode with a SHA256 HMAC)
- Time-based token validity (optional)
- Easy key management and sharing
This project is licensed under the MIT License.
Built with ❤️ using Python and cryptography.