Lines Matching refs:pkeys
35 static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
41 temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2;
48 static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
50 (*(pkeys+0)) = CRC32((*(pkeys+0)), c);
51 (*(pkeys+1)) += (*(pkeys+0)) & 0xff;
52 (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1;
54 register int keyshift = (int)((*(pkeys+1)) >> 24);
55 (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift);
65 static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
67 *(pkeys+0) = 305419896L;
68 *(pkeys+1) = 591751049L;
69 *(pkeys+2) = 878082192L;
71 update_keys(pkeys,pcrc_32_tab,(int)*passwd);
76 #define zdecode(pkeys,pcrc_32_tab,c) \
77 (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab)))
79 #define zencode(pkeys,pcrc_32_tab,c,t) \
80 (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c))
93 unsigned long* pkeys,
114 init_keys(passwd, pkeys, pcrc_32_tab);
118 header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
121 init_keys(passwd, pkeys, pcrc_32_tab);
124 buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
126 buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
127 buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);