Module: RotorMachine

Defined in:
lib/rotor_machine.rb,
lib/rotor_machine/rotor.rb,
lib/rotor_machine/factory.rb,
lib/rotor_machine/machine.rb,
lib/rotor_machine/version.rb,
lib/rotor_machine/plugboard.rb,
lib/rotor_machine/reflector.rb

Overview

The RotorMachine gem is a relatively simple implementation of the German WWII “Enigma”-style of rotor-based encryption machine.

I wrote RotorMachine primarily as an exercise in Test-Driven Development with RSpec. It is not intended to be efficient or performant, and I wasn't striving much for idiomatic conciseness. My aims were fairly modular code and a relatively complete RSpec test suite.

The documentation for Machine shows an example of how to use the module.

Many thanks to Kevin Sylvestre, whose blog post helped me understand some aspects of the internal workings of the Enigma and how the signals flowed through the pieces of the machine.

Author:

Defined Under Namespace

Modules: Factory Classes: Machine, Plugboard, Reflector, Rotor

Constant Summary collapse

VERSION_DATA =
[1, 0, 16]
VERSION =
VERSION_DATA.join(".")