Encrypt/Decrypt Functions

Posts 1–8 of 8 · Page 1 of 1
Encrypt/Decrypt Functions
Just a lil' something I found on google, this should stop those pesky hex editors! I take no credit for these, however I don't know who they belong too.

Code:
char* encrypt(const char* plaintext)
{
int len = strlen(plaintext);
char* cyphertext = new char[len+1];

for(int i=0 ; i<len ; ++i)
{
cyphertext[i] = plaintext[i] + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9;
}
cyphertext[len] = 0; 
return cyphertext;
}

char* decrypt(const char* plaintext)
{
int len = strlen(plaintext);
char* cyphertext = new char[len+1];

for(int i=0 ; i<len ; ++i)
{
cyphertext[i] = plaintext[i] - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9;
}
cyphertext[len] = 0; 
return cyphertext;
}
If you have no clue how to use em, all I can say is: learn C++ /


Enjoy!
nice dude, i try it out^^

EDIT:tested
works great

[php]test1 = "Hello";
test2 = decrypt(test1);
test3 = encrypt(test2);

DrawString(200,200,0xFFFFFFFF,pFont_Arial,"Normal: %s\nDecypted: %s\nEnycrypted: %s",test1,test2,test3);[/php]
i thank you fking very much ^^
Quote Originally Posted by kotentopf View Post
nice dude, i try it out^^

EDIT:tested
works great

[php]test1 = "Hello";
test2 = decrypt(test1);
test3 = encrypt(test2);

DrawString(200,200,0xFFFFFFFF,pFont_Arial,"Normal: %s\nDecypted: %s\nEnycrypted: %s",test1,test2,test3);[/php]
i thank you fking very much ^^
No problem! Glad I could help
1. Every reverser will see that kind of encryption immediately. But for noobs it's ok.
2. This function will give you a very very big memory leak when you call it each frame (in Present, EndScene, etc)
thats what i've been waiting to use thanks +rep
If you use this on your program, all I have to do is come here, copy and paste the decrypt function you put up there, and use it to reverse your hack.
Quote Originally Posted by Void View Post
If you use this on your program, all I have to do is come here, copy and paste the decrypt function you put up there, and use it to reverse your hack.
True...
Anyway Thx
Quote Originally Posted by Void View Post
If you use this on your program, all I have to do is come here, copy and paste the decrypt function you put up there, and use it to reverse your hack.
Thats why u change it.. notusing the same encryption method
Posts 1–8 of 8 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us