MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / decrypt_byte

Function decrypt_byte

ZLib/minizip/crypt.h:35–43  ·  view source on GitHub ↗

* Return the next byte in the pseudo-random sequence */

Source from the content-addressed store, hash-verified

33 * Return the next byte in the pseudo-random sequence
34 */
35static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab)
36{
37 unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an
38 * unpredictable manner on 16-bit systems; not a problem
39 * with any known compiler so far, though */
40
41 temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
42 return (int)(((temp * (temp ^ 1)) >> 8) & 0xff);
43}
44
45/***********************************************************************
46 * Update the encryption keys with the next byte of plain text

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected