diff --git a/armsrc/desfire_crypto.c b/armsrc/desfire_crypto.c index f9c6dd2ed..5cb36054c 100644 --- a/armsrc/desfire_crypto.c +++ b/armsrc/desfire_crypto.c @@ -30,6 +30,7 @@ static void xor (const uint8_t *ivect, uint8_t *data, const size_t len); static size_t key_macing_length (desfirekey_t key); +// iceman, see memxor inside string.c, dest/src swapped.. static void xor (const uint8_t *ivect, uint8_t *data, const size_t len) { for (size_t i = 0; i < len; i++) { data[i] ^= ivect[i]; @@ -445,7 +446,7 @@ void* mifare_cryto_postprocess_data (desfiretag_t tag, void *data, size_t *nbyte uint32_t crc; switch (DESFIRE (tag)->authentication_scheme) { case AS_LEGACY: - AddCrc14A(res, end_crc_pos); + AddCrc14A( (uint8_t*)res, end_crc_pos); end_crc_pos = crc_pos + 2; // diff --git a/armsrc/desfire_crypto.h b/armsrc/desfire_crypto.h index 7be85bfba..9964d094f 100644 --- a/armsrc/desfire_crypto.h +++ b/armsrc/desfire_crypto.h @@ -6,7 +6,6 @@ extern "C" { #endif #include -//#include "apps.h" #include "crc32.h" #include "printf.h" #include "desfire.h"