You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script allows you to encrypt text using various encryption methods.
4
+
5
+
## Installation
6
+
7
+
1. Make sure you have Python installed on your system.
8
+
2. Clone this repository or download the script file.
9
+
10
+
## Usage
11
+
12
+
1. Open a terminal or command prompt.
13
+
2. Navigate to the directory where the script is located.
14
+
3. Run the following command: python script.py
15
+
16
+
Follow the prompts to enter the text and choose an encryption method.
17
+
Encryption Methods
18
+
19
+
Caesar Cipher
20
+
The Caesar cipher is a substitution cipher where each letter in the plaintext is shifted a certain number of positions down the alphabet.
21
+
To choose the Caesar cipher, enter 1 when prompted.
22
+
23
+
Affine Cipher
24
+
The Affine cipher is a substitution cipher that combines the Caesar cipher with multiplication and addition.
25
+
To choose the Affine cipher, enter 2 when prompted.
26
+
27
+
Substitution Cipher
28
+
The Substitution cipher is a method of encryption where each letter in the plaintext is replaced by another letter according to a fixed key.
29
+
To choose the Substitution cipher, enter 3 when prompted. Note that the key must have the same length as the number of characters in the alphabet (26).
30
+
31
+
Transposition Cipher
32
+
The Transposition cipher is a method of encryption that rearranges the letters of the plaintext to form the ciphertext.
33
+
To choose the Transposition cipher, enter 4 when prompted. You will also be asked to enter a transposition key, which should be less than the length of the text.
34
+
Note: If you enter an invalid choice or provide incorrect input, appropriate error messages will be displayed.
35
+
36
+
Example
37
+
Here is an example of running the script:
38
+
Enter the text to encrypt: Hello, World!
39
+
Choose an encryption method:
40
+
1. Caesar cipher
41
+
2. Affine cipher
42
+
3. Substitution cipher
43
+
4. Transposition cipher
44
+
Enter your choice (1-4): 3
45
+
Enter the substitution key: QWERTYUIOPASDFGHJKLZXCVBNM
0 commit comments