move hitag2 crypto parts to the common folder in order to be able to use it on the client side. Some textual and minor adaptations across the bord
This commit is contained in:
1 parent
cdc46d5d2b
commit
700d558432
17 files changed
+185
-117
No files matched your search
@@ -366,18 +366,16 @@ static void print_hitag2_blocks(uint8_t *d, uint16_t n) {
|
||||
, annotation[i]
|
||||
);
|
||||
}
|
||||
PrintAndLogEx(INFO, "---------+-------------+-------+-----+---------");
|
||||
PrintAndLogEx(INFO, " L = Locked, "_GREEN_("RW") " = Read Write, R = Read Only");
|
||||
PrintAndLogEx(INFO, "--------+-------------+-------+-----+---------");
|
||||
PrintAndLogEx(INFO, " "_RED_("L") " = Locked, "_GREEN_("RW") " = Read Write, R = Read Only");
|
||||
PrintAndLogEx(INFO, " FI = Fixed / Irreversible");
|
||||
PrintAndLogEx(INFO, "-----------------------------------------------");
|
||||
PrintAndLogEx(INFO, "----------------------------------------------");
|
||||
}
|
||||
|
||||
// Annotate HITAG protocol
|
||||
void annotateHitag1(char *exp, size_t size, const uint8_t *cmd, uint8_t cmdsize, bool is_response) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
static struct {
|
||||
enum {
|
||||
STATE_HALT,
|
||||
@@ -387,16 +385,12 @@ static struct {
|
||||
} state;
|
||||
} _ht2state;
|
||||
|
||||
|
||||
void annotateHitag2_init(void) {
|
||||
_ht2state.state = STATE_HALT;
|
||||
}
|
||||
|
||||
void annotateHitag2(char *exp, size_t size, const uint8_t *cmd, uint8_t cmdsize, uint8_t bits, bool is_response) {
|
||||
|
||||
// I think its better to handle this log bytes as a long array of bits instead.
|
||||
// 1100 0
|
||||
// 1100 0001 1100 0000 00
|
||||
if (cmdsize == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user