Skip to content

πŸ” A simple Python tool to encrypt & decrypt any file using XOR operation (text, images, docs, media, executables).

Notifications You must be signed in to change notification settings

mscoder-py/media-encrypter-and-decrypter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” XOR File Encryptor / Decryptor

A simple Python program to encrypt and decrypt files using the XOR operation.
This tool can work with almost any file type including text, documents, images, audio/video, and executables.


⚑ Features

  • Encrypt and decrypt any file type (text, images, audio, video, executables, etc.)
  • Custom key support (default: 123)
  • Works via XOR encryption (lightweight & reversible)
  • Simple CLI menu interface
  • Colored warning banner to alert users

⚠️ Warning

  • Use the same key for both Encryption and Decryption
  • This program will overwrite your original file (make a backup if needed)
  • XOR encryption is not secure for sensitive data
  • Use this program at your own risk

πŸ“‚ Supported File Types

  • Text files β†’ .txt, .csv, .json, etc.
  • Documents β†’ .docx, .pdf, etc.
  • Images β†’ .jpg, .png, .bmp, etc.
  • Media β†’ .mp3, .mp4, .wav, etc.
  • Executables β†’ .exe, .dll, etc.

Basically, any binary file can be encrypted/decrypted.


πŸš€ Installation

  1. Clone this repository or copy the script file.
  2. Install requirements:
    pip install colorama

▢️ Usage

Run the script in your terminal: python xor_encryptor.py

Menu Options:

  1. Encryption
  2. Decryption
  3. Exit

Example:


  • Choose 1 to encrypt β†’ enter file path β†’ enter key β†’ file will be encrypted.

  • Choose 2 to decrypt β†’ enter file path β†’ use the same key β†’ file will be restored.

πŸ›  Example Run

  1. Encryption
  2. Decryption
  3. Exit Enter your choice here: 1 Enter your file path here (Encryption): sample.txt Enter your key for Encryption (e.g. 123): 555 File is Encrypted..

Then decrypt:

Enter your choice here: 2 Enter your file path here (Decryption): sample.txt Enter your key for Decryption (must match encryption key): 555 File is Decrypted..

πŸ“œ License


  • This project is released under the MIT License.
  • You are free to use, modify, and distribute it β€” at your own risk.

About

πŸ” A simple Python tool to encrypt & decrypt any file using XOR operation (text, images, docs, media, executables).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages