Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ XOR two strings. I am trying to XOR two strings 00112233445566778899AABBCCDDEEFFAABB060606060606 and 4ca00fd6dbf1fb284ca00fd6dbf1fb284ca00fd6dbf1fb28 my program is giving me: SPTWPVSPT[X q'&t'!u#'t~u#rPTTTVVT as a result However,

C++ XOR two strings.

I am trying to XOR two strings

00112233445566778899AABBCCDDEEFFAABB060606060606

and

4ca00fd6dbf1fb284ca00fd6dbf1fb284ca00fd6dbf1fb28

my program is giving me: SPTWPVSPT[X q'&t'!"u#'t~u"#rPTTTVVT as a result

However, when i go to http://xor.pw/? and input the two hexadecimal strings in I get the result: 4cb12de59fa49d5fc439a56d172c15d7e61b09d0ddf7fd2e

what am I doing wrong in my program below?

// plaintext value here string pthex = "00112233445566778899AABBCCDDEEFFAABB"; // IV value here string sHex = "4ca00fd6dbf1fb28"; string PaddedPlainText = pthex + "060606060606"; //added the pad //cout<

int PPTextLength = PaddedPlainText.length(); // length of plaintext int BlockCounter = (PPTextLength / 16); // number of blocks to process cout<<"Pa: "<

string XORval; string vXOR;

for (int i=1; i<=BlockCounter; i++) { cout<<"I is: "<< i< 1) for (int j =((i*16)-16); j < (((i)*16));j++) { // cout<<"the value of i: "<

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

Records And Database Management

Authors: Jeffrey R Stewart Ed D, Judith S Greene, Judith A Hickey

4th Edition

0070614741, 9780070614741

More Books

Students also viewed these Databases questions

Question

What should you set the dpi for an image you wish to print?

Answered: 1 week ago

Question

Find the derivative of y= cos cos (x + 2x)

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago