Lines Matching refs:pkeys
35 static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) {
41 temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
48 static int update_keys(unsigned long* pkeys, const z_crc_t* pcrc_32_tab, int c) {
49 (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
50 (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
51 (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
53 register int keyshift = (int)((*(pkeys+1)) >> 24);
54 (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
64 static void init_keys(const char* passwd, unsigned long* pkeys, const z_crc_t* pcrc_32_tab) {
65 *(pkeys+0) = 305419896L;
66 *(pkeys+1) = 591751049L;
67 *(pkeys+2) = 878082192L;
69 update_keys(pkeys,pcrc_32_tab,(int)*passwd);
74 #define zdecode(pkeys,pcrc_32_tab,c) \
75 (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
77 #define zencode(pkeys,pcrc_32_tab,c,t) \
78 (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), (Byte)t^(c))
91 unsigned long* pkeys,
111 init_keys(passwd, pkeys, pcrc_32_tab);
115 header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
118 init_keys(passwd, pkeys, pcrc_32_tab);
121 buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
123 buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
124 buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);