Lines Matching refs:pkeys

35 static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)  in decrypt_byte()  argument
41 temp = ((unsigned)(*(pkeys + 2)) & 0xffff) | 2; in decrypt_byte()
48 static int update_keys(unsigned long* pkeys, const unsigned long* pcrc_32_tab, int c) in update_keys() argument
50 (*(pkeys + 0)) = CRC32((*(pkeys + 0)), c); in update_keys()
51 (*(pkeys + 1)) += (*(pkeys + 0)) & 0xff; in update_keys()
52 (*(pkeys + 1)) = (*(pkeys + 1)) * 134775813L + 1; in update_keys()
54 register int keyshift = (int)((*(pkeys + 1)) >> 24); in update_keys()
55 (*(pkeys + 2)) = CRC32((*(pkeys + 2)), keyshift); in update_keys()
64 static void init_keys(const char* passwd, unsigned long* pkeys, const unsigned long* pcrc_32_tab) in init_keys() argument
66 *(pkeys + 0) = 305419896L; in init_keys()
67 *(pkeys + 1) = 591751049L; in init_keys()
68 *(pkeys + 2) = 878082192L; in init_keys()
70 update_keys(pkeys, pcrc_32_tab, (int)*passwd); in init_keys()
75 #define zdecode(pkeys, pcrc_32_tab, c) \ argument
76 (update_keys(pkeys, pcrc_32_tab, c ^= decrypt_byte(pkeys, pcrc_32_tab)))
78 #define zencode(pkeys, pcrc_32_tab, c, t) \ argument
79 (t = decrypt_byte(pkeys, pcrc_32_tab), update_keys(pkeys, pcrc_32_tab, c), t ^ (c))
89 static int crypthead(passwd, buf, bufSize, pkeys, pcrc_32_tab, crcForCrypting) in crypthead() argument
93 unsigned long* pkeys;
113 init_keys(passwd, pkeys, pcrc_32_tab);
116 header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t);
119 init_keys(passwd, pkeys, pcrc_32_tab);
121 buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t);
123 buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t);
124 buf[n++] = zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t);