A simple command-line implementation of the Caesar cipher for basic text encryption and decryption, written in Python.
- Encrypts messages using a specified shift key.
- Decrypts messages using the same shift key.
- Handles both uppercase and lowercase letters.
- Preserves spaces, numbers, and punctuation.
-
Make sure you have Python 3 installed.
-
Clone this repository or download the
CaesarCipher.pyfile. -
Open your terminal or command prompt.
-
Navigate to the directory where
CaesarCipher.pyis located. -
Run the script with the following command:
python CaesarCipher.py
--- Caesar Cipher Program ---
Choose an option:
Encrypt
Decrypt
Exit
1 Enter the message to encrypt: Hello, World! Enter the shift key (a number): 3
Ciphertext: Khoor, Zruog!