A cross-platform C++ console application that implements a simple substitution cipher for text encryption and decryption.
Choose the script for your operating system:
| Platform | Script | Command |
|---|---|---|
| macOS | docs/setup/setup-macos.sh |
chmod +x docs/setup/setup-macos.sh && ./docs/setup/setup-macos.sh |
| Linux | docs/setup/setup-linux.sh |
chmod +x docs/setup/setup-linux.sh && ./docs/setup/setup-linux.sh |
| Windows (CMD) | docs/setup/setup-windows.bat |
Double-click or run docs\setup\setup-windows.bat |
| Windows (PowerShell) | docs/setup/setup-windows.ps1 |
Set-ExecutionPolicy Bypass -Scope Process; .\docs\setup\setup-windows.ps1 |
The setup scripts will:
- ✅ Install required dependencies (CMake, compiler)
- ✅ Configure Git for cross-platform development
- ✅ Build the project
- ✅ Optionally run the application
# Clone the repository
git clone https://github.com/The-Sequence/Substitution-Cipher.git
cd Substitution-Cipher
# Create build directory
mkdir build && cd build
# Configure and build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
# Run (path varies by platform)
./bin/SubstitutionCipher # macOS/Linux
.\bin\Release\SubstitutionCipher.exe # Windows- Encrypt text using a 52-character substitution key
- Decrypt text back to original plaintext
- View current key being used for encryption
- Generate new random keys using Fisher-Yates shuffle algorithm
- Set custom encryption keys for specific use cases
- Chat history logging - saves encryption sessions to file
The substitution cipher replaces each letter in the alphabet with a corresponding letter from a key:
Original: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
Key: xjqnmhklcbydogfretiupaswvzXJQNMHKLCBYDOGFRETIUPASWVZ
Example: "Hello" → "Kmyyo"
Substitution-Cipher/
├── main.cpp # Application entry point
├── choiceLogic.cpp # Encryption/decryption logic
├── ChoiceLogic.h # Header for choice logic
├── InputValidation.cpp # User input handling
├── InputValidation.h # Header for input validation
├── CMakeLists.txt # CMake build configuration
├── README.md # This file
├── LICENSE.txt # MIT License
├── docs/
│ ├── guides/ # Documentation guides
│ │ ├── BUILD.md # Detailed build instructions
│ │ ├── WINDOWS_BUILD_GUIDE.md
│ │ └── ...
│ └── setup/ # One-click setup scripts
│ ├── setup-macos.sh
│ ├── setup-linux.sh
│ ├── setup-windows.bat
│ └── setup-windows.ps1
└── .github/
└── workflows/ # CI/CD configuration
- CMake 3.24 or higher
- C++17 compatible compiler:
- GCC 7+ (Linux)
- Clang 5+ / Xcode Command Line Tools (macOS)
- MSVC 2019+ / Visual Studio (Windows)
| Document | Description |
|---|---|
| BUILD.md | Comprehensive build instructions for all platforms |
| WINDOWS_BUILD_GUIDE.md | Windows-specific setup guide |
| WINDOWS_QUICK_REFERENCE.md | Quick reference for Windows developers |
| RESTRUCTURING_SUMMARY.md | Recent project restructuring and organization changes |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE.txt file for details.
- First proper GitHub project! Created on August 9, 2023 (Wednesday)
- Uses the classic substitution cipher technique for educational purposes
Last updated: December 2024