X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/6c283951062aaad9d0d1ba8670b02895047be438..c3e8413c2b4b8990fb28b3868069cbd9bbac3913:/common/crc.c?ds=sidebyside diff --git a/common/crc.c b/common/crc.c index 311a676c..0425a4fd 100644 --- a/common/crc.c +++ b/common/crc.c @@ -99,8 +99,8 @@ uint32_t CRC8Legic(uint8_t *buff, size_t size) { uint32_t CRC16Legic(uint8_t *buff, size_t size, uint8_t uidcrc) { #define CRC16_POLY_LEGIC 0xB400 - //uint8_t initial = reflect(uidcrc, 8); - uint16_t initial = uidcrc; + uint16_t initial = reflect(uidcrc, 8); + //uint16_t initial = uidcrc; initial |= initial << 8; crc_t crc; crc_init_ref(&crc, 16, CRC16_POLY_LEGIC, initial, 0, TRUE, TRUE);