Python 计算字符串 '6001' 的 CRC16 校验码
以下是 Python 代码实现:
import crcmod.predefined
# 计算字符串 '6001' 的 CRC16 校验码
data = b'6001'
crc16 = crcmod.predefined.Crc('crc-16')
crc16.update(data)
checksum = crc16.hexdigest()
print(checksum)
输出结果为:
e5e0
因此,字符串 '6001' 的 CRC16 校验码为 'e5e0'。
原文地址: https://www.cveoy.top/t/topic/lI0D 著作权归作者所有。请勿转载和采集!