Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm new to C++ and this is the hardest project I have faced. I understand how ROT-13 works, but don't even know how to start.

I'm new to C++ and this is the hardest project I have faced. I understand how ROT-13 works, but don't even know how to start.

The coding is the following:

// This program is an example of using the ROT-13 encryption algorithm. #include  using namespace std; #define ROTATION 13 // Routine to encrypt/decrypt an array of characters. void encrypt(char *pc2, char *pc1) { int16_t tempChar = '\0'; while (*pc1) { // Your code goes here. *pc2++ = *pc1++; } pc2 = '\0'; } int main() { char plainText[350] = {'\0'}; // Works in C++, but not in C. char encrypedText[] = "Jr gur Crbcyr bs gur Havgrq Fgngrf, va Beqre gb sbez n zber cresrpg Havba,\ rfgnoyvfu Whfgvpr, vafher qbzrfgvp Genadhvyvgl, cebivqr sbe gur pbzzba qrsrapr,\ cebzbgr gur trareny Jrysner, naq frpher gur Oyrffvatf bs Yvoregl gb bhefryirf naq bhe Cbfgrevgl,\ qb beqnva naq rfgnoyvfu guvf Pbafgvghgvba sbe gur Havgrq Fgngrf bs Nzrevpn."; char *pc; pc = encrypedText; // The number of characters to be encrypted. cout  

Instructions are the following:

image text in transcribed

Assignments-SPRING. x / D PSA 6 (1).pdf \ https://sdccdblackboard GC++ Programming: We x G write AC.. Code ForT x G CheggStudy l Guided S g secure https://sdccd.blackboard.c pid-5435522-dt-content-rid-293 774531/courses/18 120-cisc 192-89242/PSA%206%20%281%29.pdf Sober Revolution: Th D Straight edge girls Tasks SwagbucksQues on Generatio Library Genesis R Blackboards ccd 0 f18-admitted udtch AppsVideo Tutorial for U PSA 6 (1).pdf : : Purpose: In this PSA we will take a look at the "positional substitution" or rotation cipher routine again Tasks: Download the template program. In there you will find a progranm that has a encrypted message stored in a character array. Your job is to decrypt the message. Note that the ROT-13 algorithm -that was used to encipher the message - is symmetrical. That means that the same routine used to encipher the message can be used to decipher it. The template contains code to simply copy the text from one buffer the encrypted text to a plain text buffer. All you need to do is add the code that will decipher the text in the process of copying it. A couple of things to keep in mind: . The set [A ..Z) maps to the set [A Z] . The set [a z] maps to the set [a z]. . All other characters are not encrypted; they are copied as is When doing character arithmetic it is best to use uint 16 rather than char (8 bits). NOTE: you must use character arithmetic in this program! You must also use the circular buffer technique discussed in class As previously, zip your project directory and submit the results orn Blackboard. Include a sample run of your program showing the deciphered text Important: Do not forget to list the name of the participants working on the ode. Also, the code sho e well documentedl uld O Ask me anything /12/20181

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

More Books

Students also viewed these Databases questions