mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
CHG: refactor CRC16 algos. This is a big change, most likely some parts broke, hard to test it all.
This commit is contained in:
parent
d2e9f4a743
commit
52d69ed4ee
35 changed files with 512 additions and 674 deletions
|
@ -258,7 +258,7 @@ void* mifare_cryto_preprocess_data (desfiretag_t tag, void *data, size_t *nbytes
|
|||
// ... CRC ...
|
||||
switch (DESFIRE (tag)->authentication_scheme) {
|
||||
case AS_LEGACY:
|
||||
AppendCrc14443a(res + offset, *nbytes - offset);
|
||||
AddCrc14A(res + offset, *nbytes - offset);
|
||||
*nbytes += 2;
|
||||
break;
|
||||
case AS_NEW:
|
||||
|
@ -445,9 +445,8 @@ void* mifare_cryto_postprocess_data (desfiretag_t tag, void *data, size_t *nbyte
|
|||
uint32_t crc;
|
||||
switch (DESFIRE (tag)->authentication_scheme) {
|
||||
case AS_LEGACY:
|
||||
end_crc_pos = crc_pos + 2;
|
||||
AppendCrc14443a (res, end_crc_pos);
|
||||
|
||||
AddCrc14A(res, end_crc_pos);
|
||||
end_crc_pos = crc_pos + 2;
|
||||
//
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue