Enigma is a 4 day, single person project during Mod 1 of 4, for Turing School's Back End Engineering Program.
The challenge was to build an Enigma machine similar to the one developed by Alan Turing and his team in WW2. Each individual letter in the message is shifted four times, and only those who can know the key can reverse the process and reveal the original message.
Learning goals and areas of focus consisted of:
- Program structural architecture
- Break a program into logical components with proper encapsulation
- Data manipulation
- Outside file integration
- File IO
- Apply Enumerable techniques in a real context
- Technical Requirements
-
Fork MY repository
-
Copy the fork's URL
-
Clone your forked repository: Run
git clone
with the copied URL.
-
The best way to get started is to navigate into the
enigma
directory, open themessage.txt
file, and type out a message that you want encrypted. Save the file. -
Next, still in your
enigma
directory within terminal, run the following command to encrypt a message:ruby ./lib/encrypt.rb message.txt encrypted.txt
. This generates an encrypted message along with a random key to access it, along with today's date. -
You may specify a pre-determined key and date value if you wish, with the
Key
being a5 digit number
and theDate
inDDMMYY
format. -
The command would be
ruby ./lib/encrypt.rb message.txt encrypted.txt 55555 290492
with 55555 being the key and 290492 representing the date (April 29, 1992). -
The encrypted message will now live in the
encrypted.txt
file. -
To unencrypt, you must provide the key. If the date value is not today, you will need to pass the date as well. The format is as follows:
-
ruby ./lib/decrypt.rb encrypted.txt decrypted.txt 55555 290492
If the date (290492
) were not passed, the default would be today. -
Both the key and the date MUST be correct to return the decrypted message.
- Ruby 2.7.2
- RSpec
- Pry
- Atom
- GitHub
- SimpleCov
Students were asked to judge themselves according to this rubric
👤 Brian Fletcher
- Github: bfl3tch
- LinkedIn: Brian Fletcher