Write a companion program to decrypt the values you encrypt


a) A simple encryption of a character A can be performed by exclusive-ORing A with some key K to produce the encrypted value E. The original value A can be recovered by exclusive-ORing again with the same key.

Write a c/c++ program that encrypts a character from the list [A...Za...z]. The key can be any ASCII character in the range [A...Za...z]. Your program should request both a key and the character to be encrypted. The output should be the character and its encrypted value.

Print appropriate error messages if the user enters something other than an expected value. You must ensure that the encrypted value is also a printable ASCII character (hint: this may require some operations in addition to the exclusive-OR).

b) Write a companion program to decrypt the values you encrypt with the above program.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a companion program to decrypt the values you encrypt
Reference No:- TGS02925321

Expected delivery within 24 Hours