我正在尝试使用crcmod来计算由定制多项式为183(十进制)的微控制器发送的crc校验和。
当我尝试使用时
crc8 = crcmod.Crc(183)
我知道
ValueError: The degree of the polynomial must be 8, 16, 24, 32 or 64
但是
bin(183)
返回
'0b10110111'
表明它是一个8位多项式。
我在做什么错?
多项式的阶数必须为8 ...
8位数字是7度。尝试439,即183 + 256(2 ^ 8)。