SolvedEncrypting Memory Functions

Posts 13 of 3 · Page 1 of 1
Encrypting Memory Functions
Hey, I am trying to encrypt my strings in order for it to be undetected by Nexon's HShield. I have the class for it right here, but how do I go about using it to encrypt my memory function.

Code:
using std :: cout;
using std :: endl;
void encrypt( char [ ] ); // prototypes of functions used in the code
void decrypt( char * ePtr );
int main( )
{
// create a string to encrypt
char string[ ] = "this is a secret!";
cout << "Original string is: " << string << endl;
encrypt( string );
// call to the function encrypt( )
cout << "Encrypted string is: " << string << endl;
decrypt( string );
// call to the function decrypt( )
cout << "Decrypted string is: " << string << endl;
return 0;
}// main
Quote Originally Posted by arun823 View Post
Hey, I am trying to encrypt my strings in order for it to be undetected by Nexon's HShield. I have the class for it right here, but how do I go about using it to encrypt my memory function.
Encryption is actually easy once you understand what it actually is, it's just the ability to turn series of bytes into random bytes and then back again, the most basic Encryption in programming is xor(Exclusive OR) using bytes, and the most basic in Text encryption is shift encryption and one of the oldest methods of shift encryption is caesar encryption where you shift the alphabet to left or right(Encrypt/Decrypt) a given amount of times. for example if I had a string "abcdef" and I used ceasar encryption with a key(amount of times to shift to the left) that was 3 I would get "defabc" I would used the same key 3 to shift back to the right for decryption which would result back to "abcdef". even this method of basic encryption is good enough to hide your strings. Now once you understand that a string is just an array of bytes Encryption becomes a lot more easy, you can start using combinations of encryption methods, for example the ceasar method to shift the text used with a key(3 in the above example) then xor each character with the same key, As each character is a just byte anyway. Main thing to remember is its easy to convert a character to a byte and a character to a decimal value or any conversion between these 3. you can even have an array decimal value which represent each character in your string. Anyway for better explanation between data type representations check this chart.. Ascii Table - ASCII character codes and html, octal, hex and decimal chart conversion

Once you understand how simple it is you should be able to whip up a simple encryption for your self in no time at all.
Posts 13 of 3 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?