Professional Documents
Culture Documents
File Decryption
File Decryption
alphabet
#Decryption program - opens encrypted file and displays the decrypted contents
#define main
def main():
#declare variables
encryption = dict()
decryptFile()
def decryptFile():
#variables
charTxt = ''
decryptList = []
finalStr = ''
#encryption key
encryption = {'A':'m', 'a':'M', 'B':'n', 'b':'N', 'C':'o', 'c':'O', 'D':'p',
'd':'P',
'E':'q', 'e':'Q', 'F':'r', 'f':'R', 'G':'s', 'g':'S', 'H':'t',
'h':'T',
'I':'u', 'i':'U', 'J':'v', 'j':'V', 'K':'w', 'k':'W', 'L':'x',
'l':'X',
'M':'y', 'm':'Y', 'N':'z', 'n':'Z', 'O':'a', 'o':'A', 'P':'b',
'p':'B',
'Q':'c', 'q':'C', 'R':'d', 'r':'D', 'S':'e', 's':'E', 'T':'f',
't':'F',
'U':'g', 'u':'G', 'V':'h', 'v':'H', 'W':'i', 'w':'I', 'X':'j',
'x':'J',
'Y':'k', 'y':'K', 'Z':'l', 'z':'L', '.':'0', '?':'1', '!':'2',
',':'3',
' ':'4'}
#test - print(txtFile)