Embedded SDK
Embedded SDK
Functions
parser.c File Reference
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "parser.h"
#include "offsets.h"
Include dependency graph for parser.c:

Go to the source code of this file.

Functions

bool apdu_parser (command_t *cmd, uint8_t *buf, size_t buf_len)
 

Function Documentation

◆ apdu_parser()

bool apdu_parser ( command_t cmd,
uint8_t buf,
size_t  buf_len 
)

Parse APDU command from byte buffer.

Parameters
[out]cmdStructured APDU command (CLA, INS, P1, P2, Lc, Command data).
[in]bufByte buffer with raw APDU command.
[in]buf_lenLength of byte buffer.
Returns
true if success, false otherwise.

Definition at line 25 of file parser.c.