I've been trying to create a basic file obfuscation library using the
XOR operator because I heard that it was fast. Because of the
suggestions of those at the comp.lang.c++, I have decided to turn the
library into a file obfuscation library. More details are available at
http://groups.google.com/group/comp.lang.c++/browse_frm/thread/68f7859cceff1c34#
First, however, I would like to submit my previous code for peer
review. I know it is very basic. I know that loading a file into
memory via std::string is a bad idea, but as I posted in comp.lang.c+
+, it is a temporary measure. I haven't tried using ios::binary yet
(that's what the people at comp.lang.c++ recommended). I would like to
have all forms of suggestions.
Note: as I said above, I am going to turn the library into a file
obfuscation library. I am going to rename the class to FileObfuscator
or something.
So here goes a bit of my questions:
* What do I need in order to improve the performance/design.
* How can I bypass the out-of-place EOF character in the middle of a
binary file? Does the flag ios::binary help?
* Are there any other fast obfuscation methods out there?
* Is there an alternative to loading a file onto the memory via
std::string? I did it in the first place because I didn't know how to
encode the file with fstream. Therefore, I had to load a file with
std::ifstream, then write to it with std::ofstream. So the question
may be rephrased as...how can I XOR-encode or ROT13-encode a text/
binary file with fstream? Please post some examples!
You may download the library at:
http://ftp11.ohpy.com/opftp/index.php?control=Download&nOption=1&file=vrdx0DSozg5FzhP2klrSjKqqjvrlTTH3WKyW9nfrScjt_KdyTJ2J8xOXHsoNwmg0JGv_GCbQnj7uqSbZ09w15ZGOfcDuzlbrextnsn.zip
--
[ See http://www.gotw.ca/resources/clcm.htm
for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]