Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[C++]Simple encoding routine

Newbie Spellweaver
Joined
Sep 12, 2012
Messages
21
Reaction score
1
Basically, it's a simple encoding function (I think).
Here's the code:

Code:
int* EncryptKey(int key){
int res = key * 256;
int prime = abs(1024);
int table[256]; //set up our table
table[0] = 128;
table[256];
int mix = 124;
int remix = 234;
/**
Mix up table
*/
int* cipher = std::rotate(table, table+mix, table+remix);
cout << cipher;
return cipher;
}

Usage:
Code:
#include <iostream>
#include <math.>
#include <time.h>
using namespace std;
int main(){
EncryptKey(<number>);
return 0;
}

You can use:
Code:
cin.get();

to wait for the user to hit enter before exiting.
Screen:

SOjmS - [C++]Simple encoding routine - RaGEZONE Forums


The top number is a random key generated by a function I wrote, it has nothing to do with this. The bottom string is your encoded string.
Have fun.

~Youmu
 

Attachments

You must be registered for see attachments list
Back
Top