mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
chg: most of the crc16 works.
ISO14443 crc A = crc16_a ISO14443 crc B = ... ISO15693 crc = crc16_x25
This commit is contained in:
parent
57df6a1a7e
commit
e5804645f1
2 changed files with 96 additions and 27 deletions
|
@ -11,8 +11,26 @@
|
|||
#include <stdint.h>
|
||||
#include "util.h" // SwapBits
|
||||
|
||||
unsigned short update_crc16(unsigned short crc, unsigned char c);
|
||||
uint16_t crc16(uint8_t const *message, int length, uint16_t remainder, uint16_t polynomial);
|
||||
#define CRC16_POLY_CCITT 0x1021
|
||||
#define CRC16_POLY 0x8408
|
||||
|
||||
|
||||
uint16_t update_crc16_ex( uint16_t crc, uint8_t c, uint16_t polynomial );
|
||||
uint16_t update_crc16(uint16_t crc, uint8_t c);
|
||||
uint16_t crc16(uint8_t const *message, int length, uint16_t remainder, uint16_t polynomial, bool refin, bool refout);
|
||||
uint16_t crc16_ccitt(uint8_t const *message, int length);
|
||||
|
||||
uint16_t crc16_ccitt_kermit(uint8_t const *message, int length);
|
||||
uint16_t crc16_kermit(uint8_t const *message, int length);
|
||||
uint16_t crc16_xmodem(uint8_t const *d, int n);
|
||||
|
||||
uint16_t crc16_x25(uint8_t const *d, int n);
|
||||
uint16_t crc16_a(uint8_t const *d, int n);
|
||||
|
||||
bool check_crc16_ccitt(uint8_t const *d, int n);
|
||||
|
||||
//felica imp
|
||||
void felica_test();
|
||||
void init_crcccitt_tab( void );
|
||||
uint16_t update_crc_ccitt( uint16_t crc,uint8_t c );
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue