def key_exception(self, key): raise CipherException("Invalid key: {}. Playfair cipher keys must only contain alphabetic characters.".format(key))
def key_exception(self, key): raise CipherException("Invalid key: {}. For the Monoalphabetic Cipher, the key must contain only alphabetic characters".format(key)\ + " and each character in the alphabet must be used exactly once. Letters in the alphabet are mapped to the key"\ + " based on position in the string. That is, a->index_0, b->index_1, ..., z->index_25.")
def key_exception(self, key): raise CipherException( "Invalid key: {}. Caesar cipher key must be a single integer value such as `343`" .format(key))
def key_exception(self, key): raise CipherException("Invalid key: {}. Hill cipher key must be a list of single integer values such as `12 34 10 4`".format(key)\ + "and the number of integers in the list must be a perfect square. The positions in the matrix are filled" + " from top left to bottom right by filling in numbers along each row in the order they are given.")
def key_exception(self, key): raise CipherException( "Invalid key: {}. Vigenere cipher key must be a string only containing characters" .format(key))
def key_exception(self, key): raise CipherException("Invalid key: {}. Row Transposition cipher key must be a string of integers ".format(key)\ + "such as '145236' or '1 4 5 2 3 6', where each value indicates the row transpositions. Also, the key must"\ + " contain all integer values from 1-n, where n is the largest integer in the string with no duplicates.")
def key_exception(self, key): raise CipherException( "Invalid key: {}. Railfence cipher key must be a single integer such as `12`" .format(key))