Keypop Calypso Crypto Legacy SAM C++ API 0.6.0
Reference Calypso Crypto Legacy SAM API for C++
|
#include <LegacySamSelectionExtension.hpp>
Extends the CardSelectionExtension interface of the "Keypop Reader API" to provide means to define optional commands to be executed during the selection phase such as the "Unlock" command.
An instance of this interface can be obtained via the method LegacySamApiFactory::createLegacySamSelectionExtension().
In the case where the SAM is locked, three options are proposed:
All three methods are exclusive.
When the unlocking data is supplied by a provider, a CardReader is needed to perform additional exchanges after the initial selection process. The reader can be provided either at the time of the creation of the selection extension or later depending on the implementation (in the case of dynamic SAM reader allocation for example).
Definition at line 64 of file LegacySamSelectionExtension.hpp.
LegacySamSelectionExtension keypop::calypso::crypto::legacysam::sam::LegacySamSelectionExtension::prepareGetData | ( | GetDataTag | tag | ) |
Schedules the execution of a "Get Data" command for the specified tag.
Once this command is processed, data is accessible using dedicated getter methods, like LegacySam#getCaCertificate().
tag | The tag to retrieve the data for. |
IllegalArgumentException | If tag is null. |
LegacySamSelectionExtension keypop::calypso::crypto::legacysam::sam::LegacySamSelectionExtension::prepareReadAllCountersStatus | ( | ) |
Schedules the execution of a "Read Event Counter" and "Read Ceiling" commands to read the status of all counters.
LegacySamSelectionExtension keypop::calypso::crypto::legacysam::sam::LegacySamSelectionExtension::prepareReadCounterStatus | ( | int | counterNumber | ) |
Schedules the execution of a "Read Event Counter" and "Read Ceiling" commands to read the status of a counter.
Note: the status of each counter of the record to which the targeted counter belongs will be read. The number of commands actually transmitted to the SAM will be optimized before to be transmitted.
counterNumber | The number of the counter whose status is to be read (in range [0..26]). |
IllegalArgumentException | If the provided argument is out of range. |
LegacySamSelectionExtension keypop::calypso::crypto::legacysam::sam::LegacySamSelectionExtension::prepareReadSystemKeyParameters | ( | SystemKeyType | systemKeyType | ) |
Schedules the execution of a "Read Key Parameters" command for a system key.
Once this command is processed, the result is accessible with LegacySam#getSystemKeyParameter(SystemKeyType).
systemKeyType | The type of system key. |
IllegalArgumentException | If the provided argument is null. |
|
pure virtual |
Sets the unlock data provider to use for unlocking the SAM in dynamic mode.
This method must be used when the card reader needed to communicate with the target SAM is provided at a later point within the interface's implementation process.
The "Unlock" command is initiated once the filtering is successfully completed, followed by a request to the provider to obtain the needed unlocking data.
dynamicUnlockDataProvider | An implementation of LegacySamDynamicUnlockDataProviderSpi. |
IllegalArgumentException | If the provided argument is null. |
IllegalStateException | If an unlocking setting has already been set. |
|
virtual |
Sets the unlock data provider and the card reader to use for unlocking the SAM in dynamic mode.
This method must be used when the card reader is known at the time of creating the SAM selection extension.
The "Unlock" command is initiated once the filtering is successfully completed, followed by a request to the provider to obtain the needed unlocking data.
dynamicUnlockDataProvider | An implementation of LegacySamDynamicUnlockDataProviderSpi. |
targetSamReader | The card reader used to communicate with the target SAM. |
IllegalArgumentException | If one of the provided arguments is null. |
IllegalStateException | If an unlocking setting has already been set. |
|
pure virtual |
Sets the unlock data provider to use for unlocking the SAM in static mode.
This method must be used when the card reader needed to communicate with the target SAM is provided at a later point within the interface's implementation process.
The "Unlock" command is initiated once the filtering is successfully completed, followed by a request to the provider to obtain the needed unlocking data.
staticUnlockDataProvider | An implementation of LegacySamStaticUnlockDataProviderSpi. |
IllegalArgumentException | If the provided argument is null. |
IllegalStateException | If an unlocking setting has already been set. |
|
pure virtual |
Sets the unlock data provider and the card reader to use for unlocking the SAM in static mode.
This method must be used when the card reader is known at the time of creating the SAM selection extension.
The "Unlock" command is initiated once the filtering is successfully completed, followed by a request to the provider to obtain the needed unlocking data.
staticUnlockDataProvider | An implementation of LegacySamStaticUnlockDataProviderSpi. |
targetSamReader | The card reader used to communicate with the target SAM. |
IllegalArgumentException | If one of the provided arguments is null. |
IllegalStateException | If an unlocking setting has already been set. |
|
pure virtual |
Sets the unlock data to be used to unlock a SAM C1 (8 or 16 bytes) and schedules the execution of the "Unlock data" command in the first position.
The "Unlock" command will be executed only after a successful filtering.
unlockData | Unlock data as a 32-character hexadecimal string. |
IllegalArgumentException | If the provided unlock data is null, malformed or out of range. |
IllegalStateException | If an unlocking setting has already been set. |
|
pure virtual |
Sets the unlock data to be used to unlock a SAM (8 or 16 bytes) and schedules the execution of the "Unlock data" command in the first position.
The "Unlock" command will be executed only after a successful filtering.
unlockData | Unlock data as a 32-character hexadecimal string. |
productType | The targeted product type. |
IllegalArgumentException | If the provided unlock data or product type is null, malformed or out of range. |
IllegalStateException | If an unlocking setting has already been set. |