22#define LIB_APDU UINT8_C(0x10)
28#define IFX_CHECK_SW_OK(response_sw) (response_sw == 0x9000)
36#define IFX_APDU_LE_ANY 0x100u
44#define IFX_APDU_LE_ANY_EXTENDED 0x10000u
49#define IFX_APDU_DECODE 0x01u
58#define IFX_LC_MISMATCH 0x01u
68#define IFX_EXTENDED_LEN_MISMATCH 0x02u
73#define IFX_APDU_ENCODE 0x02u
78#define IFX_APDU_RESPONSE_DECODE 0x03u
83#define IFX_APDU_RESPONSE_ENCODE 0x04u
198 const uint8_t *data,
size_t data_len);
211 uint8_t **buffer,
size_t *buffer_len);
Infineon specific error code creation and parsing.
uint32_t ifx_status_t
Custom return code type used by all Infineon host software libraries.
Data storage struct for APDU response information.
uint16_t sw
APDU response status word.
size_t len
Number of bytes in ifx_apdu_response_t.data.
ifx_status_t ifx_apdu_response_decode(ifx_apdu_response_t *response, const uint8_t *data, size_t data_len)
Decodes binary data to its member representation in ifx_apdu_response_t object.
void ifx_apdu_response_destroy(ifx_apdu_response_t *response)
Frees memory associated with ifx_apdu_response_t object (but not object itself).
ifx_status_t ifx_apdu_response_encode(const ifx_apdu_response_t *response, uint8_t **buffer, size_t *buffer_len)
Encodes ifx_apdu_response_t to its binary representation.
uint8_t * data
Actual response data (might be NULL ).
Data storage for APDU fields.
uint8_t ins
APDU instruction code.
size_t lc
Length of APDU.data.
uint8_t p2
Second APDU instruction parameter byte.
ifx_status_t ifx_apdu_encode(const ifx_apdu_t *apdu, uint8_t **buffer, size_t *buffer_len)
Encodes APDU to its binary representation.
ifx_status_t ifx_apdu_decode(ifx_apdu_t *apdu, const uint8_t *data, size_t data_len)
Decodes binary data to its member representation in APDU object.
uint8_t cla
APDU instruction class.
uint8_t * data
Actual APDU content data (might be NULL ).
size_t le
Expected number of bytes in response.
void ifx_apdu_destroy(ifx_apdu_t *apdu)
Frees memory associated with APDU object (but not object itself).
uint8_t p1
First APDU instruction parameter byte.