bgneal@55: """Example of how to perform a decrypt operation using the standard bgneal@55: procedure. Assumes a key file named m209keys.cfg exists in the current directory bgneal@55: and contains the key list with indicator MB. bgneal@55: bgneal@55: """ bgneal@55: from m209.procedure import StdProcedure bgneal@55: from m209.keylist.config import read_key_list bgneal@55: bgneal@55: msg = ('IIPDU FHLMB LASGD KTLDO OSRMZ PWGEB HYMCB IKSPT IUEPF FUHEO NQTWI VTDPC' bgneal@55: ' GSPQX IIPDU FHLMB') bgneal@55: bgneal@55: proc = StdProcedure() bgneal@55: params = proc.set_decrypt_message(msg) bgneal@55: key_list = read_key_list('m209keys.cfg', params.key_list_ind) bgneal@55: if key_list: bgneal@55: proc.set_key_list(key_list) bgneal@55: plaintext = proc.decrypt() bgneal@55: print(plaintext) bgneal@55: else: bgneal@55: print("Key list '{}' not found".format(params.key_list_ind))