MCPcopy Create free account
hub / github.com/subbarayudu-j/TheAlgorithms-Python / getKeyParts

Function getKeyParts

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

Source from the content-addressed store, hash-verified

17 print('\n%sed text: \n%s' % (mode.title(), translated))
18
19def getKeyParts(key):
20 keyA = key // len(SYMBOLS)
21 keyB = key % len(SYMBOLS)
22 return (keyA, keyB)
23
24def checkKeys(keyA, keyB, mode):
25 if keyA == 1 and mode == 'encrypt':

Callers 2

encryptMessageFunction · 0.85
decryptMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected