Question: Java Encryption with Vigenere uses a key made of letters belonging to an alphabet. In order to cipher a text, take the first letter of

Java

Encryption with Vigenere uses a key made of letters belonging to an alphabet.

In order to cipher a text, take the first letter of the message and the first letter of the key, add their value (letters have a value depending on their rank in the alphabet, starting with 0). The result of the addition modulo 26 (26=the number of letters in the alphabet) gives the rank of the ciphered letter. See this article on Wikipedia for more details.

Implement a Vigenere encoder and a Vigenere decoder (and an option to switch) Define 2 functions:

1. string encode(sting plaintext) 2. string decode(string ciphertext) take inputs from console, and encrypt, or decrypt

Example of plaintext: "Thequickbrownfoxjumpsoverthelazydog" Example of a passphrase: "helloworld" Corresponding ciphertext: "alp..."

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!