autohit.utils
Class CRC
java.lang.Object
|
+--autohit.utils.CRC
- public class CRC
- extends java.lang.Object
This class will generate a 32bit CRC on a byte array.
WARNING!!!!!! Any change to this code is VERY likely to
make it incompatable with any previously calculated CRCs. In
other words, if you change this, you could break your existing
scripts.
Field Summary |
static int[] |
cTable
The crc table. |
Constructor Summary |
CRC()
|
Method Summary |
int |
calc(byte[] buf,
int off,
int len)
Calculate the CRC. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
cTable
public static final int[] cTable
- The crc table. I REALLY only want one copy of this thing.
CRC
public CRC()
calc
public int calc(byte[] buf,
int off,
int len)
- Calculate the CRC.
- Returns:
- the CRC