hsw-nbt 1.2.0
OPTIGA Authenticate NBT Host Library for C
Data Fields | Related Symbols
ifx_apdu_t Struct Reference

Data storage for APDU fields. More...

#include <infineon/ifx-apdu.h>

Data Fields

uint8_t cla
 APDU instruction class.
 
uint8_t ins
 APDU instruction code.
 
uint8_t p1
 First APDU instruction parameter byte.
 
uint8_t p2
 Second APDU instruction parameter byte.
 
size_t lc
 Length of APDU.data.
 
uint8_t * data
 Actual APDU content data (might be NULL ).
 
size_t le
 Expected number of bytes in response.
 

Related Symbols

(Note that these are not member symbols.)

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.
 
void ifx_apdu_destroy (ifx_apdu_t *apdu)
 Frees memory associated with APDU object (but not object itself).
 

Detailed Description

Data storage for APDU fields.

Definition at line 88 of file ifx-apdu.h.

Friends And Related Symbol Documentation

◆ ifx_apdu_decode()

ifx_status_t ifx_apdu_decode ( ifx_apdu_t * apdu,
const uint8_t * data,
size_t data_len )
related

Decodes binary data to its member representation in APDU object.

Parameters
[out]apduAPDU object to store values in.
[in]dataBinary data to be decoded.
[in]data_lenNumber of bytes in data.
Returns
ifx_status_t IFX_SUCCESS if successful, any other value in case of error.

◆ ifx_apdu_destroy()

void ifx_apdu_destroy ( ifx_apdu_t * apdu)
related

Frees memory associated with APDU object (but not object itself).

APDU objects may contain dynamically allocated data (e.g. APDU.data). Users would need to manually check which members have been dynamically allocated and free them themselves. Calling this function will ensure that all dynamically allocated members have been freed.

Parameters
[in]apduAPDU object whose data shall be freed.

◆ ifx_apdu_encode()

ifx_status_t ifx_apdu_encode ( const ifx_apdu_t * apdu,
uint8_t ** buffer,
size_t * buffer_len )
related

Encodes APDU to its binary representation.

Parameters
[in]apduAPDU to be encoded.
[out]bufferBuffer to store encoded data in.
[out]buffer_lenPointer for storing number of bytes in buffer.
Returns
ifx_status_t IFX_SUCCESS if successful, any other value in case of error.

Field Documentation

◆ cla

uint8_t ifx_apdu_t::cla

APDU instruction class.

Definition at line 93 of file ifx-apdu.h.

◆ data

uint8_t* ifx_apdu_t::data

Actual APDU content data (might be NULL ).

Definition at line 118 of file ifx-apdu.h.

◆ ins

uint8_t ifx_apdu_t::ins

APDU instruction code.

Definition at line 98 of file ifx-apdu.h.

◆ lc

size_t ifx_apdu_t::lc

Length of APDU.data.

Definition at line 113 of file ifx-apdu.h.

◆ le

size_t ifx_apdu_t::le

Expected number of bytes in response.

Definition at line 123 of file ifx-apdu.h.

◆ p1

uint8_t ifx_apdu_t::p1

First APDU instruction parameter byte.

Definition at line 103 of file ifx-apdu.h.

◆ p2

uint8_t ifx_apdu_t::p2

Second APDU instruction parameter byte.

Definition at line 108 of file ifx-apdu.h.


The documentation for this struct was generated from the following file: