mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-24 15:15:39 -07:00
fix crc
This commit is contained in:
parent
29086a42ab
commit
075c530962
1 changed files with 5 additions and 3 deletions
|
@ -193,9 +193,11 @@ static uint8_t TexcomTK13CRC(const uint8_t *data) {
|
||||||
|
|
||||||
static uint8_t MMBITCRC(const uint8_t *data) {
|
static uint8_t MMBITCRC(const uint8_t *data) {
|
||||||
return
|
return
|
||||||
(data[0] & 0x0f) ^ ((data[0] >> 4) & 0x0f) ^
|
(( (data[0] & 0x0f) ^ ((data[0] >> 4) & 0x0f) ^
|
||||||
(data[1] & 0x0f) ^ ((data[1] >> 4) & 0x0f) ^
|
(data[1] & 0x0f) ^ ((data[1] >> 4) & 0x0f) ^
|
||||||
(data[2] & 0x0f) ^ ((data[2] >> 4) & 0x0f);
|
(data[2] & 0x0f) ^ ((data[2] >> 4) & 0x0f)
|
||||||
|
) ^ 0x0f
|
||||||
|
) & 0x0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned char dallas_crc8(const unsigned char *data, const unsigned int size) {
|
static unsigned char dallas_crc8(const unsigned char *data, const unsigned int size) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue