mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
VSDC up to CDOL2 calc
This commit is contained in:
parent
628eceb5ed
commit
eaedf7f811
3 changed files with 30 additions and 1 deletions
|
@ -469,7 +469,10 @@ const struct tlv *tlvdb_get_inchild(const struct tlvdb *tlvdb, tlv_tag_t tag, co
|
|||
}
|
||||
|
||||
const struct tlv *tlvdb_get_tlv(const struct tlvdb *tlvdb) {
|
||||
return &tlvdb->tag;
|
||||
if (tlvdb)
|
||||
return &tlvdb->tag;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
unsigned char *tlv_encode(const struct tlv *tlv, size_t *len)
|
||||
|
@ -546,6 +549,13 @@ struct tlvdb *tlvdb_elm_get_parent(struct tlvdb *tlvdb)
|
|||
return tlvdb->parent;
|
||||
}
|
||||
|
||||
bool tlvdb_get_uint8(struct tlvdb *tlvRoot, tlv_tag_t tag, uint8_t *value)
|
||||
{
|
||||
const struct tlvdb *tlvdb = tlvdb_get(tlvRoot, tag, NULL);
|
||||
const struct tlv *tlvelm = tlvdb_get_tlv(tlvdb);
|
||||
return tlv_get_uint8(tlvelm, value);
|
||||
}
|
||||
|
||||
bool tlv_get_uint8(const struct tlv *etlv, uint8_t *value)
|
||||
{
|
||||
*value = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue