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<
Step by Step Solution
There are 3 Steps involved in it
Step: 1
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started