Turing School of Software and Design:
This project, built using Ruby, is a message encryption and decryption program based off the Enigma Machine used by Germany during WWII.
The idea of this project is to translate a character by shifting it a certain number of places down the alphabet. However, instead of using the same shift for every character, the algorithm uses 4 different shifts known as the A, B, C, and D shifts. Every fourth character will be shifted by the same amount, so the 1st, 5th, and 9th characters will be shifted with the A shift, the 2nd, 6th, and 10th characters will be shifted with the B shift, etc.
Fork or clone this repository to your local machine.
Come up with a message that you would like to encrypt by editing the message.txt
file. Then, from the command line, run the following:
$ ruby ./lib/encrypt.rb message.txt encrypted.txt
A confirmation will appear, showing the destination file, the key, and the date used for encryption. For example:
Created 'encrypted.txt' with the key 82648 and date 240818
From the command line, run the decrypt.rb
runner file with your encrypted text file name, a new destination text file and the key and date given in the confirmation you received.
$ ruby ./lib/decrypt.rb encrypted.txt decrypted.txt 82648 240818
You will again see a confirmation with the destination file and key/date given. You are now able to view these files and their outputs in your text editor.
Encryption and decryption methods are successfully implemented in the Enigma Class and the command line interface.
Code is well organized and implements the use of modules.
Methods are properly named and not excessively long. Code syntax is consistent and is properly indented.
Test coverage through Simple_Cov
shows 100% coverage. Stubs were used appropriately and successfully.
Appropriate amount of commits and pull requests. Most commits do not include multiple pieces of functionality.