mirror of
https://github.com/KyleBanks/XOREncryption.git
synced 2023-08-10 21:13:15 +03:00
Fixed python to not use a hard coded K char, and to actually use the key array
This commit is contained in:
parent
8e32db167b
commit
5fe7d2481d
@ -11,7 +11,7 @@ def encryptDecrypt(input):
|
||||
output = []
|
||||
|
||||
for i in range(len(input)):
|
||||
xor_num = ord(input[i]) ^ ord('K')
|
||||
xor_num = ord(input[i]) ^ ord(key[i % len(key)])
|
||||
output.append(chr(xor_num))
|
||||
|
||||
return ''.join(output)
|
||||
|
Loading…
Reference in New Issue
Block a user