crc v0.8.1 CRC View Source
This module is used to calculate CRC (Cyclic Redundancy Check) values for binary data. It uses NIF functions written in C to interate over the given binary calculating the CRC checksum value.
CRC implementations have been tested against these online calculators to validate their correctness to the best of our ability.
https://www.lammertbies.nl/comm/info/crc-calculation.html http://www.sunshine2k.de/coding/javascript/crc/crc_js.html
Link to this section Summary
Functions
Calculates a 16-bit CCITT CRC with the given seed, seed defaults to 0xFFFF if one is not given
Calculates a 16-bit CCITT 0x1D0F CRC
Calculates a 16-bit CCITT Kermit CRC
Calculates a 16-bit CCITT XMODEM CRC
Calculates an XOR checksum for the given binary
See :crc.crc/2
Calculates a 16-bit ANSI CRC checksum for the provided binary
Calculates a 16-bit DNP CRC
Calculates a 16-bit modbus CRC
Calculates a 16-bit Sick CRC
Calculates a 32-bit CRC
Calculates a 8-bit CRC with polynomial x^8+x^6+x^3+x^2+1, 0x14D. Chosen based on Koopman, et al. (0xA6 in his notation = 0x14D >> 1): http://www.ece.cmu.edu/~koopman/roses/dsn04/koopman04_crc_poly_embedded.pdf
See :crc.crc_final/1
See :crc.crc_init/1
See :crc.crc_update/2
Returns a list of all the pre-defined CRC models
Returns a list of all pre-defined CRC Models that match the filter given
Link to this section Functions
Calculates a 16-bit CCITT CRC with the given seed, seed defaults to 0xFFFF if one is not given.
This CCIT method uses a 0x1021 polynomial.
Calculates a 16-bit CCITT 0x1D0F CRC
This CCIT method uses a 0x1021 polynomial.
Calculates a 16-bit CCITT Kermit CRC
This CCIT method uses a 0x8408 polynomial.
ccitt_16_kermit(binary(), number()) :: number()
Calculates a 16-bit CCITT XMODEM CRC
This CCIT method uses a 0x1021 polynomial.
Calculates an XOR checksum for the given binary
crc(:crc_algorithm.params(), iodata()) :: :crc_algorithm.value()
See :crc.crc/2
.
Calculates a 16-bit ANSI CRC checksum for the provided binary
Calculates a 16-bit DNP CRC
Calculates a 16-bit modbus CRC
Calculates a 16-bit Sick CRC
Calculates a 32-bit CRC
Calculates a 8-bit CRC with polynomial x^8+x^6+x^3+x^2+1, 0x14D. Chosen based on Koopman, et al. (0xA6 in his notation = 0x14D >> 1): http://www.ece.cmu.edu/~koopman/roses/dsn04/koopman04_crc_poly_embedded.pdf
seed defaults to 0xFF if one is not given
crc_final(:crc_algorithm.resource()) :: :crc_algorithm.value()
See :crc.crc_final/1
.
crc_init(:crc_algorithm.params()) :: :crc_algorithm.resource()
See :crc.crc_init/1
.
crc_update(:crc_algorithm.resource(), iodata()) :: :crc_algorithm.resource()
See :crc.crc_update/2
.
Returns a list of all the pre-defined CRC models
Returns a list of all pre-defined CRC Models that match the filter given.
Filter is compiled into a regular expression and matched against the model name and description.