Keyple C++
0.9.0
Keyple, an Open Source SDK for Ticketing
|
#include <CalypsoPoUtils.h>
Static Public Member Functions | |
static std::shared_ptr< AbstractPoResponseParser > | updateCalypsoPo (std::shared_ptr< CalypsoPo > calypsoPo, std::shared_ptr< AbstractPoCommandBuilder< AbstractPoResponseParser >> commandBuilder, const std::shared_ptr< ApduResponse > apduResponse) |
static void | updateCalypsoPo (std::shared_ptr< CalypsoPo > calypsoPo, const std::vector< std::shared_ptr< AbstractPoCommandBuilder< AbstractPoResponseParser >>> &commandBuilders, const std::vector< std::shared_ptr< ApduResponse >> &apduResponses) |
static std::unique_ptr< ReadRecordsCmdBuild > | prepareReadRecordFile (const PoClass &poClass, const uint8_t sfi, const uint8_t recordNumber) |
static std::unique_ptr< SelectFileCmdBuild > | prepareSelectFile (const PoClass &poClass, const std::vector< uint8_t > &lid) |
static std::unique_ptr< SelectFileCmdBuild > | prepareSelectFile (const PoClass &poClass, const SelectFileControl selectControl) |
static const std::vector< uint8_t > & | getPoChallenge () |
static uint8_t | getSvKvc () |
static const std::vector< uint8_t > & | getSvGetHeader () |
static const std::vector< uint8_t > | getSvGetData () |
static const std::vector< uint8_t > | getSvOperationSignature () |
Static Public Attributes | |
static const int | MASK_3_BITS = 0x7 |
static const int | MASK_4_BITS = 0xF |
static const int | MASK_5_BITS = 0x1F |
static const int | MASK_7_BITS = 0x7F |
static const int | MASK_1_BYTE = 0xFF |
static const int | MASK_2_BYTES = 0xFFFF |
static const int | MASK_3_BYTES = 0xFFFFFF |
static const int | SFI_MIN = 0 |
static const int | SFI_MAX = MASK_5_BITS |
static const int | NB_REC_MIN = 1 |
static const int | NB_REC_MAX = 255 |
static const int | NB_CNT_MIN = 1 |
static const int | NB_CNT_MAX = 255 |
static const int | CNT_VALUE_MIN = 0 |
static const int | CNT_VALUE_MAX = 16777215 |
static const int | LE_MAX = 255 |
static const int | FILE_TYPE_MF = 1 |
static const int | FILE_TYPE_DF = 2 |
static const int | FILE_TYPE_EF = 4 |
static const int | EF_TYPE_DF = 0 |
static const int | EF_TYPE_BINARY = 1 |
static const int | EF_TYPE_LINEAR = 2 |
static const int | EF_TYPE_CYCLIC = 4 |
static const int | EF_TYPE_SIMULATED_COUNTERS = 8 |
static const int | EF_TYPE_COUNTERS = 9 |
static const int | SEL_SFI_OFFSET = 0 |
static const int | SEL_TYPE_OFFSET = 1 |
static const int | SEL_EF_TYPE_OFFSET = 2 |
static const int | SEL_REC_SIZE_OFFSET = 3 |
static const int | SEL_NUM_REC_OFFSET = 4 |
static const int | SEL_AC_OFFSET = 5 |
static const int | SEL_AC_LENGTH = 4 |
static const int | SEL_NKEY_OFFSET = 9 |
static const int | SEL_NKEY_LENGTH = 4 |
static const int | SEL_DF_STATUS_OFFSET = 13 |
static const int | SEL_KVCS_OFFSET = 14 |
static const int | SEL_KIFS_OFFSET = 17 |
static const int | SEL_DATA_REF_OFFSET = 14 |
static const int | SEL_LID_OFFSET = 21 |
static const int | PIN_LENGTH = 4 |
static const uint8_t | STORED_VALUE_FILE_STRUCTURE_ID = 0x20 |
static const uint8_t | SV_RELOAD_LOG_FILE_SFI = 0x14 |
static const uint8_t | SV_RELOAD_LOG_FILE_NB_REC = 1 |
static const uint8_t | SV_DEBIT_LOG_FILE_SFI = 0x15 |
static const uint8_t | SV_DEBIT_LOG_FILE_NB_REC = 3 |
static const uint8_t | SV_LOG_FILE_REC_LENGTH = 29 |
Utility class used to check Calypso specific data.
|
static |
(package-private)
Gets the challenge received from the PO
|
static |
(package-private)
Gets the SV Get command response data
|
static |
(package-private)
Gets the SV Get command header
|
static |
(package-private)
Gets the SV KVC from the PO
|
static |
(package-private)
Gets the last SV Operation signature (SV Reload, Debit or Undebit)
|
static |
Create a Read Records command builder for the provided arguments
poClass | the class of the PO |
sfi | the SFI of the EF to read |
recordNumber | the record number to read |
|
static |
Create a Select File command builder for the provided select control
poClass | the class of the PO |
selectControl | provides the navigation case: FIRST, NEXT or CURRENT |
|
static |
Create a Select File command builder for the provided LID
poClass | the class of the PO |
lid | the LID of the EF to select |
|
static |
(package-private)
Fills the CalypsoPo with the PO's responses to a list of commands
calypsoPo | the keyple::calypso::transaction::CalypsoPo object to fill with the provided response from the PO |
commandBuilders | the list of builders that get the responses |
apduResponses | the APDU responses returned by the PO to all commands |
CalypsoPoCommandException | if a response from the PO was unexpected |
|
static |
(package-private)
Fills the CalypsoPo with the PO's response to a single command
calypsoPo | the keyple::calypso::transaction::CalypsoPo object to fill with the provided response from the PO |
commandBuilder | the builder of the command that get the response |
apduResponse | the APDU response returned by the PO to the command |
CalypsoPoCommandException | if a response from the PO was unexpected |
|
static |
|
static |
Counter value
|
static |
|
static |
|
static |
|
static |
EF Type Values
|
static |
|
static |
|
static |
|
static |
|
static |
File Type Values
|
static |
Le max
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Counter number
|
static |
|
static |
Record number
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Field offsets in select file response (tag/length excluded)
|
static |
|
static |
|
static |
SFI
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |