Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A simple ROT encryption can be used to obfuscate a string of characters by adding a number to each character, called the key. Here is

A simple ROT encryption can be used to obfuscate a string of characters by adding a number to each
character, called the key. Here is a C++ function definition for the function encryptRQT(). The
function uses pass by reference, and forces the encrypted string to remain in the ASCII printable
character range.
// Preconditions: string s, int key
// Postconditions: encrypted s
void encryptROT (string& s, int key)
{
for (int s[i]=(s[i]+key)(s[i]33)s[i]=s[i]+33i=0;i
{
s[i]=(s[i]+key) & 128 ;
if(s[i]33)
{
s[i]=s[i]+33;
}
}
the code i was provided earlier for this did not work. I code in VS. please provide a working code.
code example -
.586
.MODEL FLAT
INCLUDE io.h ; header file for input/output
.STACK 4096
DA
valueA DWORD ?
valueB DWORD ?
valueC DWORD ?
prompt1 BYTE "Value of a?",0
prompt2 BYTE "Value of b?(not zero)",0
prompt3 BYTE "Value of c?",0
string BYTE 40 DUP (?)
result BYTE 11 DUP (?),0
resultLbl BYTE "Expression vaCODE
_MainProc PROC
image text in transcribed

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

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions

Question

How often do you meet with your graduate students?

Answered: 1 week ago