MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / getKeyPartsFromKey

Function getKeyPartsFromKey

src/gamesbyexample/affinecipher.py:72–76  ·  view source on GitHub ↗

Get the two key A and key B parts from the key.

(key)

Source from the content-addressed store, hash-verified

70
71
72def getKeyPartsFromKey(key):
73 """Get the two key A and key B parts from the key."""
74 keyA = key // len(SYMBOLS)
75 keyB = key % len(SYMBOLS)
76 return (keyA, keyB)
77
78
79def checkKey(key, mode):

Callers 3

checkKeyFunction · 0.85
encryptMessageFunction · 0.85
decryptMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected