From e42985b65ca4e7084f26bbfdb0135cca7f391614 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Fri, 29 Jan 2021 19:28:45 +0100 Subject: [PATCH] testing crc32 --- client/src/cmdanalyse.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client/src/cmdanalyse.c b/client/src/cmdanalyse.c index 87c989618..5f6860e95 100644 --- a/client/src/cmdanalyse.c +++ b/client/src/cmdanalyse.c @@ -19,6 +19,7 @@ #include "ui.h" // PrintAndLog #include "crc.h" #include "crc16.h" // crc16 ccitt +#include "crc32.h" // crc32_ex #include "tea.h" #include "legic_prng.h" #include "cmddata.h" // demodbuffer @@ -361,6 +362,12 @@ static int CmdAnalyseCRC(const char *Cmd) { uint16_t crcEE = b1 << 8 | b2; PrintAndLogEx(INFO, "FeliCa | %04x or %04x (31C3 expected)\n", crcEE, Crc16ex(CRC_FELICA, dataStr, sizeof(dataStr))); + + uint32_t crc32 = 0; + crc32_ex(dataStr, sizeof(dataStr), (uint8_t *)&crc32); + PrintAndLogEx(INFO, "CRC32 (desfire) | %08x ( expected)", crc32); + PrintAndLogEx(INFO, "---------------------------------------------------------------\n\n\n"); + return PM3_SUCCESS; }