Class: Cipher::ADFGVX

Inherits:
GenericBiCipher show all
Defined in:
lib/cipher.rb

Overview

ADFGVX

Implementation of the well known cipher used by Germany during WWI. Code number assignment is probably different from the original cipher due to implementation choices.

See The Codebreakers, D. Kahn, 1996 for reference.

http://en.wikipedia.org/wiki/ADFGVX

Instance Attribute Summary

Attributes inherited from GenericBiCipher

#key, #super_key

Instance Method Summary (collapse)

Methods inherited from GenericBiCipher

#decode, #encode

Methods inherited from SimpleCipher

#decode, #encode

Constructor Details

- (ADFGVX) initialize(key, super_key = '')

initialize



321
322
323
# File 'lib/cipher.rb', line 321

def initialize(key, super_key = '')
  super(Cipher::Polybius, key, Cipher::Transposition, super_key)
end