niccokunzmann / crc8

A module with the CRC8 algorithm for Python 2 and 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

adding crc to the binary data

claudegel opened this issue · comments

How to automatically append the crc at the end of the binary data.
ex. b'\x55\x00\x02\x0012' crc8 = 3b
need to get b'\x55\x00\x02\x0012\x3b'

Hi, can you try out this?

data = b'\x55\x00\x02\x0012'
crc = hash.digest()
data_with_hash = data + crc

If it works, it would be so great if you contributed the description to the README file as you know best how to formulate it for you.
Happy to hear from you :)

So, if this is fine with you, I close this. You can still comment if you like. You contribution to the documentation is still welcome 👍