From a963c8138b52fe6b64d23ee7dc18f14fbf259585 Mon Sep 17 00:00:00 2001 From: disu1950 Date: Sat, 15 Nov 2025 06:19:50 +0000 Subject: [PATCH] Update README.md NZN JA DISU? --- README.md | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 79 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5e4de86..02e286c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,81 @@ # XORCIPHER -Simple code for encrypt/decrypt files with xorcipher. \ No newline at end of file +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) + +```bash +# 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 + +```bash +# 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 + +```bash +# 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 + + ```bash + # Open "Developer Command Prompt for VS" then: + cl /Fe:xorcrypt.exe xorcrypt.c + ``` + + **Usage after compilation:** + + ```bash + # 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. \ No newline at end of file