Adil
DevBest CEO
- May 28, 2011
- 1,278
- 716
Basically, it's a simple encoding function (I think).
Here's the code:
Usage:
You can use:
to wait for the user to hit enter before exiting.
Screen:
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.
~Adil
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;
}
Code:
cin.get();
Screen:
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.
~Adil