Lines Matching refs:pcrc_32_tab
30 #define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8))
35 static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
48 static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
65 static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
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))
90 static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting)
95 const unsigned long* pcrc_32_tab;
115 init_keys(passwd, pkeys, pcrc_32_tab);
119 header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
122 init_keys(passwd, pkeys, pcrc_32_tab);
125 buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
127 buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
128 buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);