diff --git a/common/crc16.c b/common/crc16.c index ea02dc724..91dcf8504 100644 --- a/common/crc16.c +++ b/common/crc16.c @@ -181,7 +181,7 @@ uint16_t crc16_a(uint8_t const *d, size_t n) { // poly 0x1021 reflected 0x8408 // poly=0x1021 init=0x4807 refin=true refout=true xorout=0x0BC3 check=0xF0B8 name="CRC-16/ICLASS" uint16_t crc16_iclass(uint8_t const *d, size_t n) { - return crc16_fast(d, n, 0x4807, true, true); + return BSWAP_16(crc16_fast(d, n, 0x4807, true, true)); } // This CRC-16 is used in Legic Advant systems. @@ -200,7 +200,6 @@ uint16_t crc16_dnp(uint8_t const *d, size_t n) { return crc; } - // -----------------CHECK functions. bool check_crc16_ccitt(uint8_t const *d, size_t n) { if (n < 3) return false; diff --git a/common/crc16.h b/common/crc16.h index 54aa70114..7202e74de 100644 --- a/common/crc16.h +++ b/common/crc16.h @@ -67,8 +67,4 @@ uint16_t crc16_fast(uint8_t const *d, size_t n, uint16_t initval, bool refin, bo //checks bool check_crc16_ccitt(uint8_t const *d, size_t n); -//felica imp -void felica_test(); -void init_crcccitt_tab( void ); -uint16_t update_crc_ccitt( uint16_t crc,uint8_t c ); #endif