|
1 |
| -# Python Caesar Cipher |
2 |
| - |
3 |
| -This repository contains a simple implementation of the Caesar Cipher algorithm in Python. The Caesar Cipher is a classic encryption technique where each letter in the plaintext is shifted by a fixed number of positions in the alphabet. |
4 |
| - |
5 |
| -## Features |
6 |
| - |
7 |
| -- Encrypt a plaintext message using a shift key. |
8 |
| -- Decrypt a ciphertext message using a shift key. |
9 |
| -- Handles both uppercase and lowercase letters. |
10 |
| -- Ignores non-alphabetic characters during encryption/decryption. |
11 |
| - |
12 |
| -## How It Works |
13 |
| - |
14 |
| -The Caesar Cipher shifts each letter in the message by a specified number of positions. For example, with a shift of `3`: |
15 |
| -- `A` becomes `D` |
16 |
| -- `B` becomes `E` |
17 |
| -- `Z` wraps around to `C` |
18 |
| - |
19 |
| -## Usage |
20 |
| - |
21 |
| -### Prerequisites |
22 |
| - |
23 |
| -- Python 3.x installed on your system. |
24 |
| - |
25 |
| -### Running the Script |
26 |
| - |
27 |
| -1. Clone the repository: |
28 |
| - ```bash |
29 |
| - git clone https://github.com/Darshan-KC/Python-Caesar-cipher.git |
30 |
| - cd Python-Caesar-cipher |
31 |
| - ``` |
32 |
| - |
33 |
| -2. Run the script: |
34 |
| - ```bash |
35 |
| - python caesar_cipher.py |
36 |
| - ``` |
37 |
| - |
38 |
| -3. Follow the on-screen prompts to: |
39 |
| - - Choose between encryption and decryption. |
40 |
| - - Input the message and shift key. |
41 |
| - |
42 |
| -### Example |
43 |
| - |
44 |
| -**Input:** |
45 |
| -- Operation: Encrypt |
46 |
| -- Message: `Hello, World!` |
47 |
| -- Shift Key: `3` |
48 |
| - |
49 |
| -**Output:** |
50 |
| -- Encrypted Message: `Khoor, Zruog!` |
51 |
| - |
52 |
| -## File Structure |
53 |
| - |
54 |
| -- `caesar_cipher.py`: The main script implementing the Caesar Cipher. |
55 |
| - |
56 |
| -## Contributing |
57 |
| - |
58 |
| -Contributions are welcome! If you find bugs or want to enhance the functionality, feel free to fork the repository and submit a pull request. |
59 |
| - |
60 |
| -## License |
61 |
| - |
62 |
| -This project is licensed under the [MIT License](LICENSE). |
63 |
| - |
64 |
| ---- |
65 |
| - |
66 |
| -Happy coding! 😊 |
| 1 | +# Python Caesar Cipher |
| 2 | + |
| 3 | +This repository contains a simple implementation of the Caesar Cipher algorithm in Python. The Caesar Cipher is a classic encryption technique where each letter in the plaintext is shifted by a fixed number of positions in the alphabet. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +- Encrypt a plaintext message using a shift key. |
| 8 | +- Decrypt a ciphertext message using a shift key. |
| 9 | +- Handles both uppercase and lowercase letters. |
| 10 | +- Ignores non-alphabetic characters during encryption/decryption. |
| 11 | + |
| 12 | +## How It Works |
| 13 | + |
| 14 | +The Caesar Cipher shifts each letter in the message by a specified number of positions. For example, with a shift of `3`: |
| 15 | +- `A` becomes `D` |
| 16 | +- `B` becomes `E` |
| 17 | +- `Z` wraps around to `C` |
| 18 | + |
| 19 | +## Usage |
| 20 | + |
| 21 | +### Prerequisites |
| 22 | + |
| 23 | +- Python 3.x installed on your system. |
| 24 | + |
| 25 | +### Running the Script |
| 26 | + |
| 27 | +1. Clone the repository: |
| 28 | + ```bash |
| 29 | + git clone https://github.com/Darshan-KC/Python-Caesar-cipher.git |
| 30 | + cd Python-Caesar-cipher |
| 31 | + ``` |
| 32 | + |
| 33 | +2. Run the script: |
| 34 | + ```bash |
| 35 | + python caesar_cipher.py |
| 36 | + ``` |
| 37 | + |
| 38 | +3. Follow the on-screen prompts to: |
| 39 | + - Choose between encryption and decryption. |
| 40 | + - Input the message and shift key. |
| 41 | + |
| 42 | +### Example |
| 43 | + |
| 44 | +**Input:** |
| 45 | +- Operation: Encrypt |
| 46 | +- Message: `Hello, World!` |
| 47 | +- Shift Key: `3` |
| 48 | + |
| 49 | +**Output:** |
| 50 | +- Encrypted Message: `Khoor, Zruog!` |
| 51 | + |
| 52 | +## File Structure |
| 53 | + |
| 54 | +- `caesar_cipher.py`: The main script implementing the Caesar Cipher. |
| 55 | + |
| 56 | +## Contributing |
| 57 | + |
| 58 | +Contributions are welcome! If you find bugs or want to enhance the functionality, feel free to fork the repository and submit a pull request. |
| 59 | + |
| 60 | +## License |
| 61 | + |
| 62 | +This project is licensed under the [MIT License](LICENSE). |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +Happy coding! 😊 |
0 commit comments