public class CRC16
extends java.lang.Object
CRC16
class is used to compute a CRC16 checksum from data
provided as input value.Constructor and Description |
---|
CRC16() |
Modifier and Type | Method and Description |
---|---|
long |
getValue()
Returns the CRC16 checksum for all input received.
|
void |
reset()
Resets the CRC16 checksum to it initial state.
|
void |
update(byte[] buf)
Updates this checksum with the bytes contained in buffer buf.
|
void |
update(byte[] buf,
int offset,
int byteCount)
Update this CRC16 checksum with the contents of buf, starting from offset
and reading byteCount bytes of data.
|
void |
update(int val)
Updates this checksum with the byte value provided as integer.
|
public long getValue()
public void reset()
public void update(byte[] buf, int offset, int byteCount)
buf
- the byte array from which to read the bytes.offset
- the initial position in buf to read the bytes from.byteCount
- the number of bytes to read from buf.public void update(int val)
val
- represents the byte to update the checksum.public void update(byte[] buf)
buf
- the buffer holding the data to update the checksum with.Copyright © 2013-2018, Advanced Card Systems Ltd. All rights reserved.