Class: Key::TKey

Inherits:
Key
  • Object
show all
Includes:
Crypto
Defined in:
lib/key/tkey.rb

Overview

TKey

Class for transposition keys

A transposition key does not get condensed but serve as a generator for a numeric key based on letters. Later on, these numbers will be used to extract columns.

See en.wikipedia.org/wiki/Transposition_cipher

Constant Summary

Constant Summary

Constants included from Crypto

Crypto::BASE

Instance Method Summary (collapse)

Methods included from Crypto

#addmod10, #chainadd, #expand5to10, #find_hole, #keyshuffle, #normalize, #p1_encode, #str_to_numeric, #submod10

Constructor Details

- (TKey) initialize(key)

Returns a new instance of TKey



25
26
27
# File 'lib/key/tkey.rb', line 25

def initialize(key)
  super(key)
end

Instance Method Details

- (Object) to_numeric

to_numeric



31
32
33
# File 'lib/key/tkey.rb', line 31

def to_numeric
  @key.to_numeric
end