Lab #8
One of the first known examples of encryption was used by Julius Caesar. Caesar needed to provide written instructions to his generals, but he didn’t want his enemies to learn his plans if the message slipped into their hands. As result, he developed what later became known as the Caesar Cipher. The idea behind this cipher is simple (and as a result, it provides no protection against modern code breaking techniques). For example, each letter in the original message is shifted by 3 places. As a result, A becomes D, B becomes E, C becomes F, D becomes G, etc. The last three letters in the alphabet are wrapped around to the beginning: X becomes A, Y becomes B and Z becomes C. Non-letter characters are not modified by the cipher.
Write a function to decode a Caesar Cipher. Use it to decrypt the attached text file. Your program will read in the text file and pass the lines to the decrypt function. The trick is that you have to determine the shift. Hint: it’s not 3.
- 19 October 2022, 1:59 PM