ID Chip Reader
chip_reader.h File Reference

Header file for chip reader functions. More...

Go to the source code of this file.

Macros

#define CHIP_READER_H_
 

Functions

long ReadIdCardChip (unsigned char mrzInformation[], unsigned char imageFilePath[])
 Reads data from an ID card chip using Basic Access Control (BAC) protocol. More...
 
long ReadIdCardChipWithDocumentNumber (unsigned char documentNumber[9], unsigned char imageFilePath[])
 

Detailed Description

Header file for chip reader functions.

Author
Khoa Nguyen

This header file contains the function declaration for reading data from an ID card chip using Basic Access Control (BAC) application functions. The ReadIdCardChip function is designed to work with a smart card reader and a corresponding smart card that supports BAC protocol.

Macro Definition Documentation

◆ CHIP_READER_H_

#define CHIP_READER_H_

Function Documentation

◆ ReadIdCardChip()

long ReadIdCardChip ( unsigned char  mrzInformation[],
unsigned char  imageFilePath[] 
)

Reads data from an ID card chip using Basic Access Control (BAC) protocol.

Given the MRZ information, this function reads data from an ID card chip using the BAC protocol, which includes initializing the reader, selecting applications, getting challenges, and reading data groups (EF.COM, DG1, and DG2). This function works with a smart card reader and the corresponding smart card that supports BAC protocol.

Parameters
[in]mrzInformationThe MRZ information as an array of unsigned chars used for BAC authentication.
[out]imageFilePathThe file path to the image file that will be created after reading data from the ID card chip.
Returns
A long value representing the status code. APP_SUCCESS indicates successful reading of data from the ID card chip, otherwise an error code is returned.

◆ ReadIdCardChipWithDocumentNumber()

long ReadIdCardChipWithDocumentNumber ( unsigned char  documentNumber[9],
unsigned char  imageFilePath[] 
)