MCPcopy Create free account
hub / github.com/Squirrel/Squirrel.Windows / Uupdate_keys

Function Uupdate_keys

src/Setup/unzip.cpp:2207–2212  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2205// some decryption routines
2206#define CRC32(c, b) (crc_table[((int)(c)^(b))&0xff]^((c)>>8))
2207void Uupdate_keys(unsigned long *keys, char c)
2208{ keys[0] = CRC32(keys[0],c);
2209 keys[1] += keys[0] & 0xFF;
2210 keys[1] = keys[1]*134775813L +1;
2211 keys[2] = CRC32(keys[2], keys[1] >> 24);
2212}
2213char Udecrypt_byte(unsigned long *keys)
2214{ unsigned temp = ((unsigned)keys[2] & 0xffff) | 2;
2215 return (char)(((temp * (temp ^ 1)) >> 8) & 0xff);

Callers 2

zdecodeFunction · 0.85
unzOpenCurrentFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected