Skip to content

Threadlinee/FeD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” File Encryptor & Decryptor (C#)

A simple and fast console tool to encrypt and decrypt any kind of file using XOR byte encryption. Perfect for basic obfuscation or fun file-locking projects. Works on Windows and Linux.

image


✨ Features

  • πŸ”’ Encrypts any file type (ZIP, PDF, EXE, TXT, JPG, etc.)
  • πŸ” Reversible XOR cipher encryption
  • βœ… Input validation for file path and key
  • πŸ“‚ Saves output as .encrypted or .decrypted
  • 🧠 One key does both encryption & decryption
  • πŸ’» Runs on Windows and Linux

βš™οΈ How It Works

This tool uses a symmetric XOR algorithm:

  • XORs each byte of the file with a numeric key (0–255)
  • XORing the same file twice with the same key restores the original
Operation Input File Output File
Encrypt example.zip example.zip.encrypted
Decrypt example.zip.encrypted example.zip.encrypted.decrypted

πŸ’» How to Run

πŸͺŸ Windows

  1. Make sure .NET SDK is installed.
  2. Open CMD or PowerShell in the folder containing the .cs file.
  3. Build and run:
dotnet new console -o FileEncryptorApp
cd FileEncryptorApp
# Replace default Program.cs
copy ..\Program.cs .\Program.cs
dotnet build
After building, run the .exe directly:

cd bin\Debug\net8.0
File\ Encryptor\ \&\ Decrypter.exe
πŸ’‘ Tip: You can also double-click the File Encryptor & Decrypter.exe in File Explorer.


🐧 Linux
Install .NET SDK:

sudo apt update
sudo apt install dotnet-sdk-8.0
In terminal:

dotnet new console -o FileEncryptorApp
cd FileEncryptorApp
mv ../Program.cs ./Program.cs
dotnet run
Or, build and run the output manually:

dotnet build
cd bin/Debug/net8.0
./File\ Encryptor\ \&\ Decrypter
πŸ§ͺ Example Usage

Enter file path: /home/user/Desktop/test.pdf
Enter encryption key (0–255): 123
βœ… File encrypted successfully: test.pdf.encrypted
To decrypt, run again with the .encrypted file and the same key.

⚠️ Disclaimer
This tool uses basic XOR encryption, which is not secure for highly sensitive data. It’s intended for educational purposes, light protection, or pranking.

πŸ“„ License
Open-source under the MIT License.

πŸ‘€ Author
Made by @dionabazi with ❀️

## β˜• Support Me
If you like this project, feel free to [buy me a coffee](https://ko-fi.com/G2G114SBVV)!

[![Buy Me a Coffee](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/G2G114SBVV)