* Update the encryption keys with the next byte of plain text */
| 161 | * Update the encryption keys with the next byte of plain text |
| 162 | */ |
| 163 | int update_keys(__G__ c) |
| 164 | __GDEF |
| 165 | int c; /* byte of plain text */ |
| 166 | { |
| 167 | GLOBAL(keys[0]) = CRC32(GLOBAL(keys[0]), c, CRY_CRC_TAB); |
| 168 | GLOBAL(keys[1]) = (GLOBAL(keys[1]) |
| 169 | + (GLOBAL(keys[0]) & 0xff)) |
| 170 | * 134775813L + 1; |
| 171 | { |
| 172 | register int keyshift = (int)(GLOBAL(keys[1]) >> 24); |
| 173 | GLOBAL(keys[2]) = CRC32(GLOBAL(keys[2]), keyshift, CRY_CRC_TAB); |
| 174 | } |
| 175 | return c; |
| 176 | } |
| 177 | |
| 178 | |
| 179 | /*********************************************************************** |