Question: Develop and test a Python program that reads messages contained in a text file, and encodes the messages saved in a new file. For encoding

 Develop and test a Python program that reads messages contained in

Develop and test a Python program that reads messages contained in a text file, and encodes the messages saved in a new file. For encoding messages, a simple substitution key should be used as shown below, Each letter in the left column is substituted with the corresponding letter in the right column when encoding. Thus, to decode, the letters are substituted the opposite way. Unencrypted message files will be simple text files with file extension.txt. Encrypted message files will have the same file name, but with file extension. enc. For each message encoded, a new substitution key should be randomly generated and saved in a file with the extension 'key'. Your program should also be able to decrypt messages given a specific encoded message and the corresponding key

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!