Vigenère cipher. In order to defeat a simple letter frequencyanalysis, the Vigenère cipher encodes a letter into one of severalcipher letters, depending on its position in the input document.Choose a keyword, for example TIGER. The encoded alphabet is justthe regular alphabet shifted to start at T, the first letter of thekeyword TIGER. The second, third, fourth, and fifth letters in theinput text are encrypted using the alphabet sequences beginningwith characters I, G, E, and R, and so on. Because the key is onlyfive letters long, the sixth letter of the input text is encryptedin the same way as the first.
Write a program that encrypts or decrypts an input textaccording to this cipher.
Answer to Using C++ Vigenère cipher. In order to defeat a simple letter frequency analysis, the Vigenère cipher encodes a letter…