digest-crc
digest-crc copied to clipboard
Fix `Digest::CRC16DNP
- Set
XOR_MASKinstead of flipping bits inDigest::CRC16DNP#finish. -
Digest::CRC16DNP#updatedoes a right bit shift inlib/digest/crc16_dnp.rb. However, the C implementation did a left bit shift. For reference, CRC-16/DNP seems to input bits in reverse order (lower bits). https://reveng.sourceforge.io/crc-catalogue/16.htm#crc.cat.crc-16-dnp