| 75 | } |
| 76 | |
| 77 | void Encrypt(uint32_t *castBlock, uint32_t size, uint32_t key) |
| 78 | { |
| 79 | uint32_t seed = 0xEEEEEEEE; |
| 80 | for (unsigned i = 0; i < (size >> 2); i++) { |
| 81 | uint32_t ch = *castBlock; |
| 82 | uint32_t t = ch; |
| 83 | seed += hashtable[4][(key & 0xFF)]; |
| 84 | t ^= seed + key; |
| 85 | *castBlock = SDL_SwapLE32(t); |
| 86 | castBlock++; |
| 87 | seed += ch + (seed << 5) + 3; |
| 88 | key = (((key << 0x15) ^ 0xFFE00000) + 0x11111111) | (key >> 0x0B); |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | uint32_t Hash(const char *s, int type) |
| 93 | { |
no outgoing calls
no test coverage detected