Skip to content

Commit f1b0353

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 65d2d7f commit f1b0353

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

ciphers/shuffled_shift_cipher.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55

66

77
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')
2828
cip2 = ShuffledShiftCipher()
2929
3030
Enhanced Caesar Cipher with shuffled character set for stronger encryption.

0 commit comments

Comments
 (0)