MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __make_shift_key

Method __make_shift_key

ciphers/shuffled_shift_cipher.py:119–125  ·  view source on GitHub ↗

sum() of the mutated list of ascii values of all characters where the mutated list is the one returned by __neg_pos()

(self)

Source from the content-addressed store, hash-verified

117 return keys_l
118
119 def __make_shift_key(self) -> int:
120 """
121 sum() of the mutated list of ascii values of all characters where the
122 mutated list is the one returned by __neg_pos()
123 """
124 num = sum(self.__neg_pos([ord(x) for x in self.__passcode]))
125 return num if num > 0 else len(self.__passcode)
126
127 def decrypt(self, encoded_message: str) -> str:
128 """

Callers 1

__init__Method · 0.95

Calls 1

__neg_posMethod · 0.95

Tested by

no test coverage detected