This commit is contained in:
merlokk 2021-08-20 23:02:52 +03:00
parent 1b0ffac589
commit 87c05faffd

View file

@ -4629,6 +4629,8 @@ static int DesfileReadFileAndPrint(DesfireContext *dctx, uint8_t fnum, int filet
transactionCounter = cnt;
PrintAndLogEx(SUCCESS, "Transaction counter: %d (0x%08x)", cnt, cnt);
} else {
// For composing TMC the two subparts are concatenated as follows: actTMC || sesTMC. Both subparts are represented LSB first.
// MF2DLHX0.pdf, 10.3.2.1 Transaction MAC Counter, page 41
uint32_t actTMC = MemLeToUint2byte(&resp[0]);
uint32_t sessTMC = MemLeToUint2byte(&resp[2]);
transactionCounter = actTMC;