Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93119335

Have any Question?


Related Questions in Computer Engineering

A student ran numerical simulation on a dual-core computer

A student ran numerical simulation on a dual-core computer (3.2 GHz, 2MB Smartcache, 32GB RAM). Each simulation involve calculation of 2GB of data and takes about 3 hours. To speed up the calculation, he ran two simulati ...

Question suppose that a store offers gift certificates in

Question : Suppose that a store offers gift certificates in denominations of 25 dollars and 40 dollars. Determine the possible total amounts you can form using these gift certificates. Prove your answer using strong indu ...

Short answer1 what is the difference between a logic error

Short Answer 1. What is the difference between a logic error and a syntax error? 2. Define and discuss the difference between unary, binary and ternary operators. Give an example of each. 3. When must you use curly brace ...

Question suppose that a remote transmitter sends a message

Question : Suppose that a remote transmitter sends a message at 2500 Baud and the receiver is expecting the data rate to be 2400 Baud. Calculate the accumulated sample error for one character. Give the answer in bits.

Imposing a tariff leads to the existence of two deadweight

Imposing a tariff leads to the existence of two deadweight triangles, which are the Consumption distortion and Production distortion losses. It is easy to understand why consumption distortion constitutes a loss for soci ...

Question suppose you have to design a mobile application to

Question : Suppose you have to design a mobile application to control your microwave over internet. Define the objective, assumptions and Interface Metaphors of this application.

Assume a normal distribution for n 300 how many cases

Assume a normal distribution for N = 300. How many cases would one expect to find between +1 and -1 standard deviations around the mean?

Assembly programs use 32 bits to address memory and can

Assembly programs use 32 bits to address memory and can access up to 4gb of memory. If an assembly code for a system uses 16 bits to address memory, how many bytes of memory can the program access? Is it as simple as 2^1 ...

Question suppose we want to build a b tree that has space

Question : Suppose we want to build a B+ tree that has space for 200,000 data entries in its leaf pages. Each data entry is made up of a key and its corresponding data value. Let us assume the following specifications. E ...

The gravitational attraction between any two objects in the

The gravitational attraction between any two objects in the universe is given by the following formula: Force of Gravity = (G * m * n) / r 2 Where  m  and  n  are masses of the objects in kilograms,  r  is the distance b ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As