carson-jardine / enigma

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enigma

Turing School of Software and Design:

Table of Contents:

Project Overview:

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.

Installation:

Fork or clone this repository to your local machine.

Running the Tests:

Encryption:

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

Decryption:

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.

Self-Evaluation:

Evaluation Rubric

Functionality 3:

Encryption and decryption methods are successfully implemented in the Enigma Class and the command line interface.

Object Oriented Programming 3:

Code is well organized and implements the use of modules.

Ruby Conventions and Mechanics 4:

Methods are properly named and not excessively long. Code syntax is consistent and is properly indented.

Test Driven Development 4:

Test coverage through Simple_Cov shows 100% coverage. Stubs were used appropriately and successfully.

Version Control 4:

Appropriate amount of commits and pull requests. Most commits do not include multiple pieces of functionality.

About


Languages

Language:Ruby 100.0%