Skip to content

danilrudin/XOR-FileEncryptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Quality Gate Status GitHub license

XOR-FileEncryptor

A simple file encryption utility based on the XOR algorithm.

⚠️ Note: XOR is not cryptographically secure and should be used only for educational or simple utility purposes.


🔧 Usage

The program is run from the CLI.

xor-file-encryptor.exe [-e | -d] [-k <key> | -g] -i <input_file> -o <output_file>

Options

  • -e — encrypt the input file
  • -d — decrypt the input file
  • -k <key> — specify encryption key (string)
  • -g — generate a random key
  • -i <input_file> — input file path
  • -o <output_file> — output file path

Examples:

# Encrypt file.txt to file.enc with key "secret"
xor-file-encryptor.exe -e -k secret -i file.txt -o file.enc

# Decrypt file.enc back to file.txt with key "secret"
xor-file-encryptor.exe -d -k secret -i file.enc -o file.txt

📦 Build

Linux / macOS

cmake -B build -S .
cmake --build build --config Release

Windows (MinGW)

cmake -B build -S . -G "MinGW Makefiles"
cmake --build build --config Release