Re:Understanding the Enigma machine from “The Imitation Game...
by jgrahamc on Friday February 27, 2015 @06:19AM
(#9118274)
Hmm. Rereading the code I believe you are correct. I'm not strong in Ruby and had misunderstood what this was doing:
Reflector = Hash[*('A'..'Z').to_a.shuffle]
Reflector.merge!(Reflector.invert)
IMHO it's correct.