So I’m trying to convert my Caesar Cypher into a Vigenere Cypher. The difference being that Vig uses a shift word instead of a single shift number. For example:
– if the shift number is 2, and the secret message is “A B C” then the encrypted message would be, “C D E”.
– each letter in the shift word has a corresponding number. A = 0, B = 1, C = 2, etc. SO lets say our shift word is “cat”. That would mean our shift sequence is: 2 – 0 – 20. So if our message was “New York”, the encrypted message would be, “Peq Aolm” (pending I counted through my alphabet correctly). The shift sequence of “cat” is repeated until the message is fully encrypted.
So I cant figure out how to implement a shift word, with its corresponding shift number, and then iterate over a secret message using the proper sequence of numbers. I’m at a loss to figure out how to iterate over an array with another array.