Question: C Programming Exercise 3 Encryption and decryption of a text A simple cryptography method is the following one (Vigeere cipher) . We take the text
C Programming

Exercise 3 Encryption and decryption of a text A simple cryptography method is the following one (Vigeere cipher) . We take the text we want to encrypt and the key P. We suppose that P has length equal ton . We assign to each letter, both for the text and the key, the corresponding number (a1, Encoding We take the first letter of the text and the first letter of the key and we add their number representations. Then we find which character corresponds to the sum and we replace the first character of the text. Then we take the second character of the text and the second character of the key and we do the same etc. If the su is above 26, we sub 26 . Decoding: We take the first letter of the encoded text and the first letter of the key and we subtract their nmber representations. Then we find which character corresponds to the result and we replace the first character of the ecoded text. Then we take the second character of the encoded text and the second character of the key etc. If the result is below 0, we add 26. In any case, if the key ends, we start from the beginning. Write a C program that reads from the keyboard the key and a phrase. Implement the encryption and the decryption functions. Capital and lower letters should be considered the same. Spaces are ignored. For your program you can use the isaplha, toloer functions from
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
