]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - common/crc.c
CHG: Some testing of timings on 14443b,
[proxmark3-svn] / common / crc.c
index 311a676c47eb617dde16cda2767795ec398d3b9d..0425a4fd7b53b94c9cd0533dc2fd5c3b53866737 100644 (file)
@@ -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
 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);
        initial |= initial << 8;
        crc_t crc;
        crc_init_ref(&crc, 16, CRC16_POLY_LEGIC, initial, 0, TRUE, TRUE);
Impressum, Datenschutz