WIP field hashing support

This commit is contained in:
Alexandre Paillier
2022-04-14 18:22:35 +02:00
parent 0e9cd91ecc
commit a3f5eee116
5 changed files with 160 additions and 91 deletions

View File

@@ -386,7 +386,11 @@ bool handle_apdu(const uint8_t *const data)
type_hash(structs_array, (char*)&data[OFFSET_DATA], data[OFFSET_LC]);
break;
case P2_FIELD:
field_hash(structs_array, &data[OFFSET_DATA], data[OFFSET_LC]);
if ((data[OFFSET_P1] != P1_COMPLETE) && (data[OFFSET_P1] != P1_PARTIAL))
{
return false;
}
field_hash(&data[OFFSET_DATA], data[OFFSET_LC], data[OFFSET_P1] == P1_PARTIAL);
break;
case P2_ARRAY:
path_new_array_depth(data[OFFSET_DATA]);