public class CRCUtil extends Object
| 限定符和类型 | 方法和说明 |
|---|---|
static boolean |
crc16(byte[] data,
byte[] target)
校验crc16
|
static boolean |
crc16(byte[] data,
int target)
校验crc16
|
static byte[] |
crc16ToByteArray(byte[] data)
计算crc16,结果为2字节数组
|
static int |
crc16ToInt(byte[] data)
计算crc16,结果为大端模式的int
|
public static byte[] crc16ToByteArray(byte[] data)
data - 数据源,字节数组public static boolean crc16(byte[] data,
byte[] target)
data - 数据源,字节数组target - 2字节数组public static int crc16ToInt(byte[] data)
data - 数据源,字节数组public static boolean crc16(byte[] data,
int target)
data - 数据源,字节数组target - int目标数据Copyright © 2024. All rights reserved.