Write a program that encrypts a character from the list

Assignment Help Computer Engineering
Reference no: EM132131870

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.

Reference no: EM132131870

Questions Cloud

Write a program that supports the given operations : Write a program that supports the following operations: int add(string login, string time, int priority, int size, int handle).
Calculate the standard deviation value of precipitate weight : Q1: Calculate the standard deviation of chloride concentration of your measurement result Q2: Calculate the relative standard deviation (RSD) of your chloride
Write a program that checks whether or not a given file : Write a program that checks whether or not a given file is formatted correctly for a very simple version of XML.
Aqueous solution containing an unknown monoprotic acid : Suppose 100.0 mL of an aqueous solution containing an unknown monoprotic acid (called HA) is titrated with 0.150 M KOH.
Write a program that encrypts a character from the list : Write a companion program to decrypt the values you encrypt with the given program.
What rules would you apply to clean the data : Identify what rules would you apply for ensuring the data is clean and is of high quality.
Ground beef relative of broiled chicken : A 41 kg person walking 5.6 km/hr requires 758 kJ of energy per hour. How much further does he have to walk to consume the addition
What is the correct chemical formula : After heating, the sample mass is 1.83 g. What is the molar ratio of water to cobalt chloride? What is the correct chemical formula
Mass of an average silicon atom : What are the symbol and name of the element whose average atoms have a mass very nearly half the mass of an average silicon atom?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write a program that opens two text files for input

Write a program that opens two text files for input and one for output. The program should concatenate the corresponding lines of the input files.

  What the inductive hypothesis provides in the proof

Your proof must explicitly and clearly indicate the base case you prove, the inductive case you prove and what the inductive hypothesis provides in the proof.

  Should users be divided by site or remain within a single ou

Should users divided by site or remain within a single OU? Why you are making this recommendation. What other recommendations could be implement for these OUs?

  Describe a sequence of insertions and deletions

Describe a sequence of insertions and deletions where this strategy gives a bad amortized cost.

  Choose one of the major areas of middleware graphics ai

choose one of the major areas of middleware graphics ai networking sound movie animation physics. research the major

  What are the reasons of project failure

Make sure to contain how and why project was initiated, what setting up was done, how plan went wrong and what was done to solve the trouble. What are the reasons of project failure

  Write the expression for the charge on the capacitor plate

At time t=0 the capacitor is charged to 200uC,and the current is 0,write the expression for the charge on the capacitor s plate as the time function ?

  Describe the difference between noise and distortion how

question 1 what is the difference between noise and distortion? how can noise and distortion be introduced into a

  How the researchers established dependability of the data

Describe the type of data collected in study and how it was collected. Discuss how the researchers established the dependability, or reliability, of the data.

  Who is to say what can and cannot be posted on the web

There are concerns about Web content at levels. Parents want to protect their children from pornography. Who is to say what can and cannot be posted on the Web?

  Discussing the different stakeholders and clients interest

discussing the different stakeholders and clients' interests and any potential political conflicts in implementing your information system project

  What do you mean by an entity

How is it possible to get more information from the equal amount of data though using a database approach as opposed to a file approach.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd