Page 1 of 1
how to judge that the class byte of APDU command is valid?
Posted: Fri Jun 15, 2018 4:46 am
by later123654
how to judge that the class byte of APDU command is valid? I want to know the answer, please tell me and thanks!
Re: how to judge that the class byte of APDU command is valid?
Posted: Fri Jun 15, 2018 4:56 am
by hanjing
Please refer to JavaCard222JCREspec 4.5.1 and hope to help you.
Re: how to judge that the class byte of APDU command is valid?
Posted: Fri Jun 15, 2018 4:57 am
by wumindejia
According to specific specifications,Ins is generally 0x00,0x04,0x80,0x84.
Re: how to judge that the class byte of APDU command is valid?
Posted: Fri Jun 15, 2018 5:11 am
by gyylxz
Filter by the following function:
int8_t apdu_is_valid_cla(void)
{
return (int8_t)((((g_apdu_info.cla) & 0xE0) != 0x20) && ((g_apdu_info.cla) != 0xFF));
}
Re: how to judge that the class byte of APDU command is valid?
Posted: Fri Jun 15, 2018 5:12 am
by gyylxz
Filter by the following function:
int8_t apdu_is_valid_cla(void)
{
return (int8_t)((((g_apdu_info.cla) & 0xE0) != 0x20) && ((g_apdu_info.cla) != 0xFF));
}