public class CRC8 extends Object implements Checksum, Serializable
Constructor and Description |
---|
CRC8(int polynomial,
short init)
构造
|
Modifier and Type | Method and Description |
---|---|
long |
getValue() |
void |
reset() |
void |
update(byte[] buffer)
Updates the current checksum with the specified array of bytes.
|
void |
update(byte[] buffer,
int offset,
int len) |
void |
update(int b) |
public CRC8(int polynomial, short init)
polynomial
- Polynomial, typically one of the POLYNOMIAL_* constants.init
- Initial value, typically either 0xff or zero.public void update(byte[] buffer, int offset, int len)
public void update(byte[] buffer)
update(buffer, 0, buffer.length)
.buffer
- the byte array to update the checksum withCopyright © 2024. All rights reserved.