Skip to content

Commit fa137fd

Browse files
committed
Updated some numbers
1 parent d09dfc7 commit fa137fd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ciphers/enigma_machine2.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ def _validator(rotpos: tuple, rotsel: tuple, pb: str) -> tuple:
6262
# Checks if rotor positions are valid
6363
rotorpos1, rotorpos2, rotorpos3 = rotpos
6464
if not 0 < rotorpos1 <= len(abc):
65-
raise ValueError(
66-
f'First rotor position is not within range of 1..74 ({rotorpos1})')
65+
raise ValueError(f'First rotor position is not within range of 1..26 ('
66+
f'{rotorpos1}')
6767
if not 0 < rotorpos2 <= len(abc):
68-
raise ValueError(f'Second rotor position is not within range of 1..74 ('
68+
raise ValueError(f'Second rotor position is not within range of 1..26 ('
6969
f'{rotorpos2})')
7070
if not 0 < rotorpos3 <= len(abc):
71-
raise ValueError(f'Third rotor position is not within range of 1..74 ('
71+
raise ValueError(f'Third rotor position is not within range of 1..26 ('
7272
f'{rotorpos3})')
7373

7474
# Validates string and returns dict
@@ -166,7 +166,7 @@ def enigma(text: str, rotor_position: tuple,
166166
167167
168168
:param text: input message
169-
:param rotor_position: tuple with 3 values in range 1..74
169+
:param rotor_position: tuple with 3 values in range 1..26
170170
:param rotor_selection: tuple with 3 rotors ()
171171
:param plugb: string containing plugboard configuration (default '')
172172
:return: en/decrypted string

0 commit comments

Comments
 (0)