All Packages Class Hierarchy This Package Previous Next Index
Class au.net.aba.crypto.provider.CRC16
java.lang.Object
|
+----java.security.MessageDigest
|
+----au.net.aba.crypto.provider.CRC16
- public class CRC16
- extends MessageDigest
A class that implements the CCITT CRC-16 checksumming algorithm, for the
reflected polynomial 0x8408. Note: if you want to do a zero value check
on some data and it's associated CRC, the CRC should be added after the
data, least significant byte first.
-
ident
-
-
CRC16()
- This constructor is used to begin a new CRC-16 operation
-
engineDigest()
- return the CRC.
-
engineReset()
- reset the CRC back to zero.
-
engineUpdate(byte)
- update the CRC with a single byte.
-
engineUpdate(byte[], int, int)
- update the CRC with an array of bytes.
ident
public static final String ident
CRC16
public CRC16()
- This constructor is used to begin a new CRC-16 operation
engineReset
protected void engineReset()
- reset the CRC back to zero.
- Overrides:
- engineReset in class MessageDigest
engineUpdate
protected synchronized void engineUpdate(byte b)
- update the CRC with a single byte.
- Parameters:
- b - the byte of input.
- Overrides:
- engineUpdate in class MessageDigest
engineUpdate
protected synchronized void engineUpdate(byte bytes[],
int offset,
int length)
- update the CRC with an array of bytes.
- Parameters:
- bytes - the input array.
- offset - the offset to start getting bytes from.
- length - the number of bytes to be processed.
- Overrides:
- engineUpdate in class MessageDigest
engineDigest
protected synchronized byte[] engineDigest()
- return the CRC. Note this resets it.
- Returns:
- the crc16 as a byte array.
- Overrides:
- engineDigest in class MessageDigest
All Packages Class Hierarchy This Package Previous Next Index