X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/d2736c4e2019a54de8a8a483847fb637be889d10..caaa4293ad077ba5cf2205288984a3f470464286:/common/crc.h diff --git a/common/crc.h b/common/crc.h index 946be8a1..e2ccd34b 100644 --- a/common/crc.h +++ b/common/crc.h @@ -11,6 +11,7 @@ #include #include +#include typedef struct crc { uint32_t state; @@ -39,6 +40,10 @@ extern uint32_t crc_finish(crc_t *crc); // Calculate CRC-8/Maxim checksum uint32_t CRC8Maxim(uint8_t *buff, size_t size ); + +// Calculate CRC-8 Mifare MAD checksum +uint32_t CRC8Mad(uint8_t *buff, size_t size); + /* Static initialization of a crc structure */ #define CRC_INITIALIZER(_order, _polynom, _initial_value, _final_xor) { \ .state = ((_initial_value) & ((1L<<(_order))-1)), \