disu1950 d04ee14e23 assets
example
2025-11-15 06:35:34 +00:00
2025-11-15 06:35:34 +00:00
2025-11-15 06:12:36 +00:00
2025-11-15 06:12:36 +00:00
2025-11-15 06:22:59 +00:00
2025-11-15 06:20:29 +00:00

XORCIPHER

Simple code for encrypt/decrypt files with xorcipher.

ZAŠTO OVO?

Zato sta svugdi online svi nude enceypt/decrypt text sa xor cipher, a malo tko nudi za encrypt files...

Jednostavan .c kod lagan i esy for usage.

Here's how to compile xorcrypt.c file to a Win32 executable using gcc:

Method 1: Using MinGW-w64 (Recommended)

# Compile as 32-bit Windows executable
gcc -m32 -o xorcrypt.exe xorcrypt.c

# Or with more specific options
gcc -m32 -O2 -s -o xorcrypt.exe xorcrypt.c

Method 2: Using Specific Architecture

# If you have multiple gcc targets
i686-w64-mingw32-gcc -o xorcrypt.exe xorcrypt.c

# Or for standard MinGW
mingw32-gcc -o xorcrypt.exe xorcrypt.c

Method 3: With Additional Compiler Flags

# Compile with optimizations and stripped debug info
gcc -m32 -O2 -s -Wall -o xorcrypt.exe xorcrypt.c

# Or for a smaller executable
gcc -m32 -Os -s -ffunction-sections -fdata-sections -Wl,--gc-sections -o xorcrypt.exe xorcrypt.c

Installation Options for GCC:

Option A: Install MinGW-w64

  • Download from: https://www.mingw-w64.org/

  • Or use Chocolatey: choco install mingw

  • Or use MSYS2: pacman -S mingw-w64-i686-gcc

Option B: Using Visual Studio Developer Command Prompt

# Open "Developer Command Prompt for VS" then:
cl /Fe:xorcrypt.exe xorcrypt.c

Usage after compilation:

# Encrypt/decrypt a file
xorcrypt.exe input.txt output.txt mypassword

# Example
xorcrypt.exe document.txt encrypted.bin secretkey

Important Notes:

  • -m32 flag: Forces 32-bit compilation (remove for 64-bit)
  • -O2: Optimization level 2
  • -s: Strip debug symbols (smaller executable)
  • -Wall: Enable all warnings

If you get "architecture not supported" error:

  • Install 32-bit development libraries

  • Use i686-w64-mingw32-gcc specifically for 32-bit Windows

The compiled executable will be a standalone Win32 console application that can encrypt/decrypt files using XOR encryption with the provided key.

Description
Simple code for encrypt/decrypt files with xorcipher.
Readme WTFPL 482 KiB
Languages
C 100%