Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- unsigned int _rotl(const unsigned int value, int shift) {
- if ((shift &= sizeof(value) * 8 - 1) == 0)
- return value;
- return (value << shift) | (value >> (sizeof(value) * 8 - shift));
- }
- int main()
- {
- string name;
- cout << "Enter your desired name:" << endl;
- cin >> name;
- int size = name.size();
- int a = 0;
- for (int i = 0; i < size; i++)
- {
- unsigned char b = name[i];
- a += b;
- int eax = (int)b;
- a = _rotl(a, 1);
- eax *= a;
- a = eax;
- eax = b;
- a += eax;
- a ^= b;
- }
- int c = a;
- c ^= -1;
- c += 0xBADC0DE5;
- c ^= 0x1337C0DE;
- cout << "Your serial is: " << c << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement