From 4f276400d78a8edfd432d01cb37fcc416e97fc31 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Thu, 7 May 2020 15:43:30 +0200 Subject: [PATCH] This shit doesn't work --- caesar.py | 5 ++--- lib/__pycache__/vars.cpython-38.pyc | Bin 441 -> 441 bytes 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/caesar.py b/caesar.py index 52e713f..3740b4c 100644 --- a/caesar.py +++ b/caesar.py @@ -26,9 +26,8 @@ for char in txt_list: # loop through all of the chars print("Decrypting char-index: " + str(charindex) + " (" + char + ")") index = index + in_key # shift the alphabet - while( index >= alen ): #cycle through the alphabet - diff = (index + in_key) - (alen - 1) - index = 0 + diff # a bit spaghetti but who doesn't like spaghetti + while( index > alen - 1 ): #cycle through the alphabet + index = (index + in_key) - (alen - 1) decryp_list[charindex] = alphabet[in_alphabet][index] diff --git a/lib/__pycache__/vars.cpython-38.pyc b/lib/__pycache__/vars.cpython-38.pyc index a40c1d86cbbe13b04406778db28c417798b7a4e5..786cd1502acc1479911ac6b68cc865758881ae63 100644 GIT binary patch delta 19 ZcmdnVypx$Ll$V!_0SFBEH*&3K1OO)(1Ev4~ delta 19 ZcmdnVypx$Ll$V!_0SJEcY~)(c2mmX~1a1HT