-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.py
More file actions
28 lines (25 loc) · 811 Bytes
/
Main.py
File metadata and controls
28 lines (25 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import KyanToolKit_Py
import EncryptKey
import string
ktk = KyanToolKit_Py.KyanToolKit_Py()
#--Key Generation-------------------------------------------------
# print(ktk.banner("Key Initiation"))
# key = ktk.getInput("Please Enter Your Key")
# if "" == key:
# ktk.Err("Input key please")
key = "abcde"
#--init-----------------------------------------------------------
while True:
ktk.clearScreen()
# get input
print(ktk.banner("Encryption: " + "key = " + key))
original = ktk.getInput("Please Enter Your Words:")
# original = "I'm coming"
ciphered = ""
for i in range(len(original)):
if original[i] in string.ascii_letters:
ciphered += str(ord(original[i]) ^ ord(key[i%len(key)])) + "-"
else:
ciphered += original[i]
print(ciphered)
ktk.pressToContinue("Press any key to continue ...")