| tejashs (63) | |||
|
guys i read this article on XOR encryption http://www.cplusplus.com/forum/articles/38516/ and tried to implement it for text files, but there are a few hurdles... I am just learning the c++ now, so can you point out any errors, the same class i have written is intended for both encoding and decoding 80 characers at a time until EOF is reached in the decoded file some characters are decoded and some are not
| |||
|
|
|||
| kbw (5375) | |
| There are a number of problems. Change your 80 to 4 and step thru it in the debugger. | |
|
|
|
| tejashs (63) | |
I found out 1 problem in line 48 fout << in; and what should i look out for while debugging, the debugger i have GNU debugger in code::blocks IDE.And one more thing i have noticed that the original file contained 800+characters but the encoded and decoded files contain 500+ characters EDIT: * if i give 1000 in place of 80 full file is being read * would it be better if i used string object | |
|
Last edited on
|
|
| tejashs (63) | |
|
i even used the ios::binary tag to open the files but its still the same problem:( and many more times the decoding becomes an infinite loop | |
|
|
|