I have been trying for way too long to make my Vigenere cipher work, but now I am so confused I don't even know what I am doing. I need some guidance in what it is that I am doing wrong. When I ran check50 the argc part of the code where a single-command argument works, but the ciphering itself just doesn't work. I really appreciate the help!
Assuming i
is the index of the current character in the plaintext, 65
is the ASCII value of the uppercase 'A', word
is the key used to cipher the plaintext and j % strlen(word)
is the index of the current char
in that key, what's wrong with this formula?
plaintext[i] - 65 + word[j % strlen(word)]) %26 + 65;