overcat / fastcrc

A hyper-fast Python module for computing CRC(8, 16, 32, 64) checksum.
https://fastcrc.readthedocs.io
MIT License
19 stars 6 forks source link

Missing CRC_16_AUTOSAR #9

Open Code7R opened 10 months ago

Code7R commented 10 months ago

Hi,

I am missing the CRC16 variant commonly used in the Automotive industry. See https://www.autosar.org/fileadmin/standards/R21-11/CP/AUTOSAR_SWS_CRCLibrary.pdf . It seems to be:

7.2.2.1 16-bit CCITT-FALSE CRC16

Which brings us to https://github.com/mrhooray/crc-rs/issues/54 which was closed but IMHO not fully implemented. So the "CCITT standard" is probably equivalent to CRC_16_IBM_3740, fine. But the botched implementation (used in AUTOSAR) doesn't seem to be covered by any profile.

Is there a way to get it supported? That will probably require to add some flags (field) to the Algorithm parameter struct.