Provides basic methods to prepare and process APDU exchange with a card.
More...
#include <keypop/genericcard/CardTransactionManager.hpp>
|
| virtual | ~CardTransactionManager ()=default |
| |
| virtual CardTransactionManager & | prepareApdu (const std::string &apduCommand)=0 |
| | Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is invoked. More...
|
| |
| virtual CardTransactionManager & | prepareApdu (const std::vector< std::uint8_t > &apduCommand)=0 |
| | Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is invoked. More...
|
| |
| virtual CardTransactionManager & | prepareApdu (const std::uint8_t cla, const std::uint8_t ins, const std::uint8_t p1, const std::uint8_t p2, const std::vector< std::uint8_t > &dataIn, const std::uint8_t le)=0 |
| | Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is invoked. More...
|
| |
| virtual CardTransactionManager & | prepareApdu (const std::uint8_t cla, const std::uint8_t ins, const std::uint8_t p1, const std::uint8_t p2, const std::vector< std::uint8_t > &dataIn)=0 |
| | Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is invoked. More...
|
| |
| virtual const std::vector< std::vector< std::uint8_t > > | getResponsesAsByteArrays ()=0 |
| | Returns the list of responses corresponding to the commands executed by the last call to processCommands(keypop::reader::ChannelControl), represented as byte arrays. More...
|
| |
| virtual const std::vector< std::string > | getResponsesAsHexStrings ()=0 |
| | Returns the list of responses corresponding to the commands executed by the last call to processCommands(keypop::reader::ChannelControl), represented as hexadecimal strings. More...
|
| |
Provides basic methods to prepare and process APDU exchange with a card.
- Since
- 1.0.0
Definition at line 30 of file CardTransactionManager.hpp.
◆ ~CardTransactionManager()
| virtual keypop::genericcard::CardTransactionManager::~CardTransactionManager |
( |
| ) |
|
|
virtualdefault |
◆ getResponsesAsByteArrays()
| virtual const std::vector< std::vector< std::uint8_t > > keypop::genericcard::CardTransactionManager::getResponsesAsByteArrays |
( |
| ) |
|
|
pure virtual |
Returns the list of responses corresponding to the commands executed by the last call to processCommands(keypop::reader::ChannelControl), represented as byte arrays.
Each element in the returned list represents the response of one command, in the same order as the commands were prepared. The returned list is never null.
This method does not alter the internal state of the manager: the list of responses remains available for later calls until processCommands(keypop::reader::ChannelControl) is invoked again, at which point it is replaced by the new set of responses.
- Returns
- A not-null list of byte arrays representing the command responses, in the same order as the commands were sent.
- Since
- 1.0.0
◆ getResponsesAsHexStrings()
| virtual const std::vector< std::string > keypop::genericcard::CardTransactionManager::getResponsesAsHexStrings |
( |
| ) |
|
|
pure virtual |
Returns the list of responses corresponding to the commands executed by the last call to processCommands(keypop::reader::ChannelControl), represented as hexadecimal strings.
Each element in the returned list represents the response of one command, in the same order as the commands were prepared. The returned list is never null.
This method does not alter the internal state of the manager: the list of responses remains available for later calls until processCommands(keypop::reader::ChannelControl) is invoked again, at which point it is replaced by the new set of responses.
- Returns
- A not-null list of hexadecimal strings representing the command responses, in the same order as the commands were sent.
- Since
- 1.0.0
◆ prepareApdu() [1/4]
| virtual CardTransactionManager & keypop::genericcard::CardTransactionManager::prepareApdu |
( |
const std::string & |
apduCommand | ) |
|
|
pure virtual |
Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is invoked.
- Parameters
-
| apduCommand | A not empty hexadecimal string containing a raw APDU command. |
- Returns
- This instance.
- Since
- 1.0.0
◆ prepareApdu() [2/4]
| virtual CardTransactionManager & keypop::genericcard::CardTransactionManager::prepareApdu |
( |
const std::uint8_t |
cla, |
|
|
const std::uint8_t |
ins, |
|
|
const std::uint8_t |
p1, |
|
|
const std::uint8_t |
p2, |
|
|
const std::vector< std::uint8_t > & |
dataIn |
|
) |
| |
|
pure virtual |
Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is invoked.
- Parameters
-
| cla | The class byte. |
| ins | The instruction byte. |
| p1 | The P1 parameter. |
| p2 | The P2 parameter. |
| dataIn | The APDU data, empty if there is no data. |
- Returns
- This instance.
- Since
- 1.0.0
◆ prepareApdu() [3/4]
| virtual CardTransactionManager & keypop::genericcard::CardTransactionManager::prepareApdu |
( |
const std::uint8_t |
cla, |
|
|
const std::uint8_t |
ins, |
|
|
const std::uint8_t |
p1, |
|
|
const std::uint8_t |
p2, |
|
|
const std::vector< std::uint8_t > & |
dataIn, |
|
|
const std::uint8_t |
le |
|
) |
| |
|
pure virtual |
Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is invoked.
- Parameters
-
| cla | The class byte. |
| ins | The instruction byte. |
| p1 | The P1 parameter. |
| p2 | The P2 parameter. |
| dataIn | The APDU data, empty if there is no data. |
| le | The expected output length, 0 if the output length is unspecified.. |
- Returns
- This instance.
- Since
- 1.0.0
◆ prepareApdu() [4/4]
| virtual CardTransactionManager & keypop::genericcard::CardTransactionManager::prepareApdu |
( |
const std::vector< std::uint8_t > & |
apduCommand | ) |
|
|
pure virtual |
Prepares an APDU to be transmitted the next time processCommands(keypop::reader::ChannelControl) is invoked.
- Parameters
-
| apduCommand | A not empty byte arrays containing raw APDU commands. |
- Returns
- This instance.
- Since
- 1.0.0
The documentation for this class was generated from the following file: