webfunds.util
Class CRC
java.lang.Object
|
+--webfunds.util.CRC
- public final class CRC
- extends java.lang.Object
This class performs the CRC check as required by pgp base64 Encoded packets.
|
Constructor Summary |
CRC()
|
|
Method Summary |
void |
add(byte[] buf)
This adds the contents of the buffer to the CRC. |
static int |
checksum(byte[] buf)
|
static int |
checksum(int accum,
byte[] buf)
|
int |
crc()
This adds the contents of the buffer to the CRC. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ACCUM_INIT
public static final int ACCUM_INIT
CRC
public CRC()
checksum
public static int checksum(byte[] buf)
checksum
public static int checksum(int accum,
byte[] buf)
add
public final void add(byte[] buf)
- This adds the contents of the buffer to the CRC.
- Parameters:
buf - the buffer to add.
crc
public final int crc()
- This adds the contents of the buffer to the CRC.
- Returns:
- the CRC value so far.