|
5 | 5 |
|
6 | 6 |
|
7 | 7 | class ShuffledShiftCipher: |
8 | | - """ |
9 | | - This algorithm uses the Caesar Cipher algorithm but removes the option to |
10 | | - use brute force to decrypt the message. |
11 | | - |
12 | | - The passcode is a random password from the selection buffer of |
13 | | - 1. uppercase letters of the English alphabet |
14 | | - 2. lowercase letters of the English alphabet |
15 | | - 3. digits from 0 to 9 |
16 | | - |
17 | | - Using unique characters from the passcode, the normal list of characters, |
18 | | - that can be allowed in the plaintext, is pivoted and shuffled. Refer to docstring |
19 | | - of __make_key_list() to learn more about the shuffling. |
20 | | - |
21 | | - Then, using the passcode, a number is calculated which is used to encrypt the |
22 | | - plaintext message with the normal shift cipher method, only in this case, the |
23 | | - reference, to look back at while decrypting, is shuffled. |
24 | | - |
25 | | - Each cipher object can possess an optional argument as passcode, without which a |
26 | | - new passcode is generated for that object automatically. |
27 | | - cip1 = ShuffledShiftCipher('d4usr9TWxw9wMD') |
| 8 | + """ |
| 9 | + This algorithm uses the Caesar Cipher algorithm but removes the option to |
| 10 | + use brute force to decrypt the message. |
| 11 | +
|
| 12 | + The passcode is a random password from the selection buffer of |
| 13 | + 1. uppercase letters of the English alphabet |
| 14 | + 2. lowercase letters of the English alphabet |
| 15 | + 3. digits from 0 to 9 |
| 16 | +
|
| 17 | + Using unique characters from the passcode, the normal list of characters, |
| 18 | + that can be allowed in the plaintext, is pivoted and shuffled. Refer to docstring |
| 19 | + of __make_key_list() to learn more about the shuffling. |
| 20 | +
|
| 21 | + Then, using the passcode, a number is calculated which is used to encrypt the |
| 22 | + plaintext message with the normal shift cipher method, only in this case, the |
| 23 | + reference, to look back at while decrypting, is shuffled. |
| 24 | +
|
| 25 | + Each cipher object can possess an optional argument as passcode, without which a |
| 26 | + new passcode is generated for that object automatically. |
| 27 | + cip1 = ShuffledShiftCipher('d4usr9TWxw9wMD') |
28 | 28 | cip2 = ShuffledShiftCipher() |
29 | 29 |
|
30 | 30 | Enhanced Caesar Cipher with shuffled character set for stronger encryption. |
|
0 commit comments