The Caesar cipher is a simple and widely known encryption technique. It works by shifting each letter in the plaintext by a fixed number of positions down or up the alphabet.
This Python program allows you to encrypt and decrypt messages using the Caesar cipher with a specified key.
- Encryption: Transform plain text into a Caesar cipher with a specified key.
- Decryption: Reverse the Caesar cipher to reveal the original plain text.
- Shifts: Choose any integer value from 1 to 26 for shifting the characters.
-
Run the program:
python caesar_cipher.py
-
Select 'e' for encryption or 'd' for decryption.
-
Enter the shift key (1-26).
-
Input the text you want to process.
-
The program will display the encrypted or decrypted text.
- Input:
e
- Shift Key:
3
- Text:
hello, world!
- Output:
khoor, zruog!
- Input:
d
- Shift Key:
3
- Text:
khoor, zruog!
- Output:
hello, world!
This project is open source and available under the MIT License.
Enjoy your exploration of the Caesar cipher! Feel free to contribute or provide feedback.