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

Data storage struct for APDU response information. More...

#include <infineon/ifx-apdu.h>

Data Fields

uint8_t * data
 Actual response data (might be NULL ).
 
size_t len
 Number of bytes in ifx_apdu_response_t.data.
 
uint16_t sw
 APDU response status word.
 

Related Symbols

(Note that these are not member symbols.)

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.
 
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.
 
void ifx_apdu_response_destroy (ifx_apdu_response_t *response)
 Frees memory associated with ifx_apdu_response_t object (but not object itself).
 

Detailed Description

Data storage struct for APDU response information.

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

Friends And Related Symbol Documentation

◆ ifx_apdu_response_decode()

ifx_status_t ifx_apdu_response_decode ( ifx_apdu_response_t * response,
const uint8_t * data,
size_t data_len )
related

Decodes binary data to its member representation in ifx_apdu_response_t object.

Parameters
[out]responseifx_apdu_response_t 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_response_destroy()

void ifx_apdu_response_destroy ( ifx_apdu_response_t * response)
related

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

ifx_apdu_response_t objects will most likely be populated by ifx_apdu_response_decode(). 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]responseifx_apdu_response_t object whose data shall be freed.

◆ ifx_apdu_response_encode()

ifx_status_t ifx_apdu_response_encode ( const ifx_apdu_response_t * response,
uint8_t ** buffer,
size_t * buffer_len )
related

Encodes ifx_apdu_response_t to its binary representation.

Parameters
[in]responseifx_apdu_response_t 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

◆ data

uint8_t* ifx_apdu_response_t::data

Actual response data (might be NULL ).

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

◆ len

size_t ifx_apdu_response_t::len

Number of bytes in ifx_apdu_response_t.data.

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

◆ sw

uint16_t ifx_apdu_response_t::sw

APDU response status word.

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


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