MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / InitCRC32

Function InitCRC32

Libraries/unrar/crc.cpp:22–33  ·  view source on GitHub ↗

Build the classic CRC32 lookup table. We also provide this function to legacy RAR and ZIP decryption code.

Source from the content-addressed store, hash-verified

20// Build the classic CRC32 lookup table.
21// We also provide this function to legacy RAR and ZIP decryption code.
22void 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
36static void InitTables()

Callers 4

SetKey15Method · 0.85
SetAV15EncryptionMethod · 0.85
SetKey20Method · 0.85
InitTablesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected