bgneal@55: """Example of how to perform an encrypt 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: key_list = read_key_list('m209keys.cfg', 'MB') bgneal@55: if key_list: bgneal@55: proc = StdProcedure(key_list=key_list) bgneal@55: plaintext = "THE PIZZA HAS ARRIVED STOP NO SIGN OF ENEMY FORCES STOP" bgneal@55: msg = proc.encrypt(plaintext, spaces=True, ext_msg_ind='PDUFHL', sys_ind='I') bgneal@55: print(msg) bgneal@55: else: bgneal@55: print("Key list MB not found")