From 5fe7d2481da63fc8cefa23f5203215f91d530851 Mon Sep 17 00:00:00 2001 From: KyleBanks Date: Sun, 6 Oct 2013 16:03:27 -0400 Subject: [PATCH] Fixed python to not use a hard coded K char, and to actually use the key array --- Python/XOREncryption.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/XOREncryption.py b/Python/XOREncryption.py index 82de79b..decf2d8 100644 --- a/Python/XOREncryption.py +++ b/Python/XOREncryption.py @@ -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)