سؤال

What are the last 3 bits in APDU Update Records?

-- -- -- -- -- 0 0 0    First record
-- -- -- -- -- 0 0 1    Last record
-- -- -- -- -- 0 1 0    Next record
-- -- -- -- -- 0 1 1    Previous record
-- -- -- -- -- 1 0 0    Record number given in P1 

For example with APDU 00 DC 00 03 08 ....
I update the current record on current EF (Elementary File) but previous record, what does?

Thank you for your suggestions.

هل كانت مفيدة؟

المحلول

Well There are 3 mode to update a record. Every APDU consists of 5 bytes First byte is class then INS then P1,P2 and Length. In your case:-

Class - '00' 
INS - 'DC' 
P1 - '00' 
p2 - '03' 
Length - '08'

Now mode is decided by P2.

'02' = next record;
'03' = previous record;
'04' = absolute mode/current mode, the record number is given in P1 with P1='00' denoting the current record.

Now suppose you are at record number 2 and you want to update 3rd record then you will give P2 as '02' and if you want to update 1 record then you will give P2 as '03'. If you want to update the same 2nd record give P1='00' and P2='04'. If you want to update 6th record then give P1='06' and P2='04'.

Please ask if you want more clarification.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top