Package org.miaixz.bus.core.io.check
Class CRC8
java.lang.Object
org.miaixz.bus.core.io.check.CRC8
- All Implemented Interfaces:
Serializable,Checksum
CRC8 循环冗余校验码(Cyclic Redundancy Check)实现 代码来自:https://github.com/BBSc0der
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Constructor Details
-
CRC8
public CRC8(int polynomial, short init) 构造- Parameters:
polynomial- Polynomial, typically one of the POLYNOMIAL_* constants.init- Initial value, typically either 0xff or zero.
-
-
Method Details
-
update
public void update(byte[] buffer, int offset, int len) -
update
public void update(byte[] buffer) Updates the current check with the specified array of bytes. Equivalent to callingupdate(buffer, 0, buffer.length). -
update
public void update(int b) -
getValue
public long getValue() -
reset
public void reset()
-