mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
Fix htole32 issue
This commit is contained in:
parent
0b204f5d1d
commit
9a07c06596
1 changed files with 5 additions and 1 deletions
|
@ -560,7 +560,7 @@ void *mifare_cryto_postprocess_data(desfiretag_t tag, void *data, size_t *nbytes
|
||||||
PrintAndLogEx(NORMAL, "Expected MAC %s", sprint_hex(data + *nbytes, key_macing_length(key)));
|
PrintAndLogEx(NORMAL, "Expected MAC %s", sprint_hex(data + *nbytes, key_macing_length(key)));
|
||||||
PrintAndLogEx(NORMAL, "Actual MAC %s", sprint_hex(edata + edl - 8, key_macing_length(key)));
|
PrintAndLogEx(NORMAL, "Actual MAC %s", sprint_hex(edata + edl - 8, key_macing_length(key)));
|
||||||
#endif
|
#endif
|
||||||
#ifdef WITH_DEBUG
|
#ifdef WITH_DEBUG
|
||||||
Dbprintf("MACing not verified");
|
Dbprintf("MACing not verified");
|
||||||
hexdump((uint8_t *)data + *nbytes, key_macing_length(key), "Expect ", 0);
|
hexdump((uint8_t *)data + *nbytes, key_macing_length(key), "Expect ", 0);
|
||||||
hexdump((uint8_t *)edata + edl - 8, key_macing_length(key), "Actual ", 0);
|
hexdump((uint8_t *)edata + edl - 8, key_macing_length(key), "Actual ", 0);
|
||||||
|
@ -897,6 +897,10 @@ desfire_crc32_byte(uint32_t *crc, const uint8_t value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef htole32
|
||||||
|
#define htole32(x) (x)
|
||||||
|
#endif
|
||||||
|
|
||||||
void desfire_crc32(const uint8_t *data, const size_t len, uint8_t *crc) {
|
void desfire_crc32(const uint8_t *data, const size_t len, uint8_t *crc) {
|
||||||
uint32_t desfire_crc = CRC32_PRESET;
|
uint32_t desfire_crc = CRC32_PRESET;
|
||||||
for (size_t i = 0; i < len; i++) {
|
for (size_t i = 0; i < len; i++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue