An Encryption And Decryption Program
It's back to the schedule, so here's my latest creation . A python program that does encryption and decryption in both the Caesar Cipher and the Vigenère Cipher. When given a message with a key, the program shall input the two into an encryption function which will return the encrypted message unless there are errors. For show, the encrypted message is outputted to the console and then placed into the decryption function along with its key, which returns the message decrypted. The Caesar Cipher does the following: Get the message and key Validate message and key Make sure the message is a string made up of ASCII characters (and only visible ones; the ones from char 33 to 126) and the key is an integer Print to console the problems and stop if validation fails For every letter in the message Get the current letter and its ASCII number If the ASCII number of the current letter plus the key is above 126 Add to the output string the character with an ASCII n