* Update the encryption keys with the next byte of plain text */
| 46 | * Update the encryption keys with the next byte of plain text |
| 47 | */ |
| 48 | static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c) |
| 49 | { |
| 50 | (*(pkeys+0)) = CRC32((*(pkeys+0)), c); |
| 51 | (*(pkeys+1)) += (*(pkeys+0)) & 0xff; |
| 52 | (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; |
| 53 | { |
| 54 | register int keyshift = (int)((*(pkeys+1)) >> 24); |
| 55 | (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); |
| 56 | } |
| 57 | return c; |
| 58 | } |
| 59 | |
| 60 | |
| 61 | /*********************************************************************** |