Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Lab 4 In cryptography, encryption is the process of encoding a message or information in such a way that only authorized parties can access it.

Lab 4 In cryptography, encryption is the process of encoding a message or information in such a way that only authorized parties can access it. In this lab you will write a program to decode a message that has been encrypted. Define a class with the following: A variable to hold an encrypted message. This variable should be a c-string whose storage space will be allocated by the constructor. A status variable that will tell whether the message was loaded successfully. A constructor that receives two parameters: a string variable with the file name and an int variable with the maximum number of bytes that can be uploaded (use this parameter to dynamically allocate space for the variable that will hold the message). You must be careful to not read more characters than you allocated for the c-string variable or you risk having your program crash. After you successfully read the message from the file, set the value of the status variable to true. A function that returns the value of the status variable. The value of this variable should always be checked prior to decoding, since trying to decode an empty string may result in your program crashing. A function that decodes the message. Use the following key to decode: input character: abcdefghijklmnopqrstuvwxyz decoded character: iztohndbeqrkglmacsvwfuypjx That means each 'a' in the input text should be replaced with an 'i', each 'b' with a 'z' and so forth. A function that prints the message on the screen I will provide a program that tests your class below ifqkwxcadf ar cei fpoi masif cd cei xkdqirr du pxxnwafm pf pnmdkaceo cd p oirrpmi, teaqe rqkpohnir cei gpcp af ac-oplafm ac sikw gauuaqvnc pfg caoi qdfrvoafm, au fdc xkpqcaqpnnw aoxdrrahni, cd gigvqi cei dkamafpn masif dfnw cei ifqdgig gpcp. afxvcr cd cei pnmdkaceo cwxaqpnnw afsdnsi pggacadfpn riqkic gpcp qpnnig liwr, teaqe xkisifcr cei oirrpmi ukdo hiafm giqdgig-isif au cei pnmdkaceo ar xvhnaqnw lfdtf.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago