Txtcodec¶
Indices and tables¶
Background¶
Encrypting messages to prevent eavesdropping started thousands of years ago. One simple method of encryption os the substitution cipher, where one letter is replaced with another and the length of the string is maintained. An example of this is ROT13.
Exercise¶
Implement a program to encode and decode messages using a substitution cipher.
The program should allow the user to:
- Indicate which operation to perform (encrypt, decrypt)
- Read the message to encrypt / decrypt from the command line
- Print the output message to the terminal