CipherUtil::wordToOrder word ?keepDups?
word
. Example: "dog" -> 132. If there are more
than 9 letters in the word then the ordering is indeterminate; values over 9
are reduced to a single digit. If the value of keepDups
is 1,
then all matching letters will be given the same value. Otherwise they will be
given values that increase from their position in the word, going from left to
right. For example, "that" -> 3214 if keepDups
is 0,
but "that" -> 3213 if keepDups
is 1.
keepDups
defaults to 0.
CipherUtil::generateKeysquares word ?width? ?height?
width
and height
are both 5 then this procedure will replace any occurrences of j
with i
.
CipherUtil::saveCipherToFile cipherObj chanid
CipherUtil::readSavedCipher
. If stdout
is used as the channel id then the cipher will be printed to standard output.
CipherUtil::readCiphertext filename
filename
is -
then the ciphertext will be read from standard input. Newlines in the ciphertext file will be replaced with a single space character. This procedure returns the ciphertext that was read from the file.
CipherUtil::readSavedCipher filename
CipherUtil::saveCipherToFile
. This procedure returns a list of
key-value pairs suitable for use as an argument to the Tcl command array
set
. This procedure does not create a new cipher object, rather, it
returns enough information that the caller can use to create a new cipher
object.
CipherUtil::caesarShift
CipherUtil::loadK3Fragments filename
CipherUtil::lreverse list
CipherUtil::phillipsIoc ciphertext
CipherUtil::periodicIoc ciphertext