i have a file and xor it with the string "secret"
(restart at "s" when you come to "t"). And i must import the file that i XOR.How i do tht?
THX.
This is a discussion on xor with string within the C++ Programming forums, part of the General Programming Boards category; i have a file and xor it with the string "secret" (restart at "s" when you come to "t"). And ...
i have a file and xor it with the string "secret"
(restart at "s" when you come to "t"). And i must import the file that i XOR.How i do tht?
THX.
i'm confused...what are you on about??
Please direct all complaints regarding this post to the nearest brick wallHave a nice day.
XOR a string?
Well, you could traverse the string and XOR each char character. Not that hard. Use a while loop.
For the other string (SECRET), use i % strlen("secret") to get it's index, since you want it to wrap.
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.