1 Attachment(s)
[C++]First try of a XOR Encryptor
Well here i go XD.
This is my second program, first was mailslot net sender.This is a simple and kinda inneficient XOR encryption program.
Basically encripts a file with a given key, and to recover the original file you must use the same key to process it again.
WARNING: It worked 10/10 times for me but im not completely sure so dont tryit on important files.
Another important info: When it processes a file the encrypted copy will have .crypt extension appended to the original file name , BUT when you process the ".crypt" file it will remove the ".crypt" from the path resulting in overwritting the original file, to avoid this either change name or move the file to another folder.
The .cript file is created in the same directory as the original file.
My english is crappy but i hope the info got clear ^_^.
I also have a problem, the exe is HUGE, 400+ kb uncompressed, and yes I disabled debugging information,any suggestions?
I would like you to post suggestions or bugs , the coments are greatly apreciated :D
Btw the rar file contains the executable and the source, its made in dev-Cpp.
PS:I forgot telling im ovbiously a newbie and requesting no flaming for my errors.
Re: [C++]First try of a XOR Encryptor
A problem I encountered often too is that including some libraries, like std::cout, increases your executables filesize a lot. There is probably a way to avoid this, but I'm not aware of it.
As for overwriting, couldn't you add a warning asking the user if he wants to overwrite the file? :wink:
Re: [C++]First try of a XOR Encryptor
Nonetheless, MinGW is more accurate than your saying dev-cpp is a compiler.
Re: [C++]First try of a XOR Encryptor
4069B IS 4KB. A KB is 1024B, not 1000.
Re: [C++]First try of a XOR Encryptor
Quote:
Originally Posted by
RepublicOfAstra
4069B IS 4KB. A KB is 1024B, not 1000.
Yes, 2^10 = 1024, it is NOT 1000, however people simplify to 1000 because it is easier than 1024.
However, if you are talking scientifically with regards to SI units, 1 kB = 1000 bytes, because a lowercase k indicates kilo. It was then recommended to use an uppercase K, however this clashes with the SI unit for the Kelvin, and so it moved on to the Kibibyte, where 1024 bytes = 1 KiB
Re: [C++]First try of a XOR Encryptor
Quote:
Originally Posted by
FragFrog
A problem I encountered often too is that including some libraries, like std::cout, increases your executables filesize a lot. There is probably a way to avoid this, but I'm not aware of it.
As for overwriting, couldn't you add a warning asking the user if he wants to overwrite the file? :wink:
put this underneath the includes...
Code:
using namespace std;
Re: [C++]First try of a XOR Encryptor
i need to learn this XOR encyptian process :P
Re: [C++]First try of a XOR Encryptor
XOR was one of the first encryption methods, its very basic. But can be cool if you're new ;)