*cipherProc*configure ?options?- Configure the settings for the grandpre cipher. Valid options are:
*cipherProc*configure -ciphertext string*cipherProc*configure -ct string- Set the ciphertext for this cipher instance to
**string**. Invalid letters or numbers in the ciphertext are silently discarded. *cipherProc*configure -language*language***This option is currently ignored for all cipher types.**Set the current cipher language to. If the cipher has a solve method then digram frequencies for this language are used to determine the best fit. If the language is not specified or not known then english is used.*language*

*cipherProc*cget option- Look up the value for a given option. Valid options are:
*cipherProc*cget -type- Returns the type of this cipher. In this case,
**grandpre** *cipherProc*cget -ciphertext*cipherProc*cget -ct- Return the ciphertext for this cipher.
*cipherProc*cget -plaintext*cipherProc*cget -pt- Return the plaintext for this cipher based on the current key setting.
*cipherProc*cget -key- Returns the current key setting for this cipher. The result
can be passed back to this cipher instance or another cipher
with the
*cipherProc restore*subcommand. *cipherProc*cget -length- Returns the length of the ciphertext for this cipher.
**0**is returned if the ciphertext has not been set. *cipherProc*cget -intlength- Returns the number of ciphertext values. Since each pair of ciphertext digits represents a single plaintext letter, this will be half of the ciphertext length.
*cipherProc*cget -keylist*cipherProc*cget -period- Return the period for this cipher.
*cipherProc*cget -language- Returns the name of the language used for this cipher.

*cipherProc*substitute ct pt- Substitute the numerical pairs
**ct**with the plaintext values in**pt**. An invalid substitution will generate an error. For example:*cipherProc*substitute 1212 abcauses conflicting substitutions (

**12**->**a**and**12**->**b**). *cipherProc*restore key- The
**restore**command restores the cipher's key to a previously stored state. The output fromcan be passed back into the*cipherProc*cget -key**restore**command to implement a crude*save*feature. Example:`set key [$firstCipher cget -key]`

`$secondCipher restore $key`

*cipherProc*undo ?ct?- Clears all changes that have been made to the ciphertext. If ciphertext numbers are specified, then the key entries for only those numbers are cleared.
*cipherProc*locate tip ?ct?- Drag the tip along the ciphertext until a valid substitution is found. If
**ct**is specified then the tip dragging starts at the first occurrence of**ct**in the ciphertext.

Back to the Index