* Initialize the encryption keys and the random header according to * the given password. */
| 63 | * the given password. |
| 64 | */ |
| 65 | static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab) |
| 66 | { |
| 67 | *(pkeys+0) = 305419896L; |
| 68 | *(pkeys+1) = 591751049L; |
| 69 | *(pkeys+2) = 878082192L; |
| 70 | while (*passwd != '\0') { |
| 71 | update_keys(pkeys,pcrc_32_tab,(int)*passwd); |
| 72 | passwd++; |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | #define zdecode(pkeys,pcrc_32_tab,c) \ |
| 77 | (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) |
no test coverage detected