This project emulates the fundamental encryption principles of the historic Enigma device. This program illustrates a simplified cipher system, providing insight into early cryptographic methods. For educational purposes only.
This C++ program simulates a basic version of the Enigma machine, a historical encryption device used during World War II. It allows for simple encryption and decryption of messages. To execute it:
Understanding the Program: The program defines an EnigmaMachine class that simulates the basic logic of the Enigma encryption process. The main() function initializes the Enigma machine with rotor and reflector configurations, allowing the user to encrypt or decrypt a message.
Execution Steps:
- Open your preferred C++ compiler or integrated development environment (IDE) that supports C++.
- Copy and paste the code into a new C++ file (e.g., enigma.cpp).
- Compile the code using the C++ compiler, ensuring you have the necessary dependencies set up.
- Run the compiled program in the command line or IDE terminal.
- Follow the prompts to select encryption or decryption and input the message accordingly.
Example Workflow: Compile the code: g++ -o enigma enigma.cpp Execute the compiled program: ./enigma Follow the on-screen instructions to choose between encryption or decryption and input your message.