Build the classic CRC32 lookup table. We also provide this function to legacy RAR and ZIP decryption code.
| 20 | // Build the classic CRC32 lookup table. |
| 21 | // We also provide this function to legacy RAR and ZIP decryption code. |
| 22 | void InitCRC32(uint *CRCTab) |
| 23 | { |
| 24 | if (CRCTab[1]!=0) |
| 25 | return; |
| 26 | for (uint I=0;I<256;I++) |
| 27 | { |
| 28 | uint C=I; |
| 29 | for (uint J=0;J<8;J++) |
| 30 | C=(C & 1) ? (C>>1)^0xEDB88320 : (C>>1); |
| 31 | CRCTab[I]=C; |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | |
| 36 | static void InitTables() |
no outgoing calls
no test coverage detected