Open rawr51919 opened 5 years ago
I think the residue value is a side product of the calculation, not an init value. In what scenario is this value useful? Is there a use case where this value is used in practice?
It is used for CRC verification: when the device runs the message+CRC through the CRC algorithm again, it'll see a final value of residue
if there were no transmission errors. https://stackoverflow.com/a/242164/2404492
Since pycrc is used simply for CRC calculation, it is unclear whether the support of residue should be added to pycrc. The way I currently see it implies that the CRC verification is left to the user.
In http://reveng.sourceforge.net/crc-catalogue/, the CRCs described within utilize a residue value as part of their calculations. In the case of CRC8 (or at least the implementation pycrc uses), it uses a residue value of 0x00, however other CRC algorithms use different residue values. Do you think that residue values can be reasonably implemented into pycrc, @tpircher?