MCPcopy Index your code
hub / github.com/subbarayudu-j/TheAlgorithms-Python / checkValidKey

Function checkValidKey

ciphers/simple_substitution_cipher.py:22–29  ·  view source on GitHub ↗
(key)

Source from the content-addressed store, hash-verified

20 print('\n%sion: \n%s' % (mode.title(), translated))
21
22def checkValidKey(key):
23 keyList = list(key)
24 lettersList = list(LETTERS)
25 keyList.sort()
26 lettersList.sort()
27
28 if keyList != lettersList:
29 sys.exit('Error in the key or symbol set.')
30
31def encryptMessage(key, message):
32 """

Callers 1

mainFunction · 0.85

Calls 1

sortMethod · 0.45

Tested by

no test coverage detected