niccokunzmann / crc8

A module with the CRC8 algorithm for Python 2 and 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Settings clarification requests

gaetano83 opened this issue · comments

Hi,
Thank you for the module.

Using this module, I would like to match the calculation of CRC8 from this website http://www.sunshine2k.de/coding/javascript/crc/crc_js.html when:

  • Polynomial = 0x7
  • Initial value = 0xFF
  • Final Xor Value = 0x0

Which settings I have to use with crc8 module.

Thanks

image

This is a good question. Please have a look at the JS implementation of the website.

image

>>> h = crc8.crc8()
>>> h.update(b'hello')
>>> h.hexdigest()
'92'

I will close this - you can open it again.