This commit is contained in:
iceman1001 2022-07-23 17:39:40 +02:00
commit 5a8d9b7954
3 changed files with 32 additions and 8 deletions

View file

@ -1846,6 +1846,10 @@ void iClass_WriteBlock(uint8_t *msg) {
AddCrc(write + 1, 9);
write_len -= 2;
} else {
if (payload->req.use_replay) {
memcpy(write + 10, payload->mac, sizeof(payload->mac));
} else {
// Secure tags uses MAC
uint8_t wb[9];
wb[0] = payload->req.blockno;
@ -1857,6 +1861,7 @@ void iClass_WriteBlock(uint8_t *msg) {
doMAC_N(wb, sizeof(wb), hdr.key_d, mac);
memcpy(write + 10, mac, sizeof(mac));
}
}
start_time = eof_time + DELAY_ICLASS_VICC_TO_VCD_READER;