Methods Summary |
---|
int | getFinalCRC()
return ~globalCrc;
|
int | getGlobalCRC()
return globalCrc;
|
void | initialiseCRC()
globalCrc = 0xffffffff;
|
void | setGlobalCRC(int newCrc)
globalCrc = newCrc;
|
void | updateCRC(int inCh)
int temp = (globalCrc >> 24) ^ inCh;
if (temp < 0) {
temp = 256 + temp;
}
globalCrc = (globalCrc << 8) ^ CRC.crc32Table[temp];
|
void | updateCRC(int inCh, int repeat)
int globalCrcShadow = this.globalCrc;
while (repeat-- > 0) {
int temp = (globalCrcShadow >> 24) ^ inCh;
globalCrcShadow = (globalCrcShadow << 8) ^ crc32Table[(temp >= 0)
? temp
: (temp + 256)];
}
this.globalCrc = globalCrcShadow;
|