Keypop Calypso Card C++ API 2.0.0
Reference Calypso Card API for C++
|
#include <SecureSymmetricCryptoTransactionManager.hpp>
Public Member Functions | |
virtual T & | prepareOpenSecureSession (const WriteAccessLevel writeAccessLevel)=0 |
virtual T & | prepareSvGet (const SvOperation svOperation, const SvAction svAction)=0 |
virtual T & | prepareSvReload (const int amount, const std::vector< uint8_t > &date, const std::vector< uint8_t > &time, const std::vector< uint8_t > &free)=0 |
virtual T & | prepareSvReload (const int amount)=0 |
virtual T & | prepareSvDebit (const int amount, const std::vector< uint8_t > &date, const std::vector< uint8_t > &time)=0 |
virtual T & | prepareSvDebit (const int amount)=0 |
virtual T & | prepareInvalidate ()=0 |
virtual T & | prepareRehabilitate ()=0 |
virtual T & | prepareChangeKey (const int keyIndex, const uint8_t newKif, const uint8_t newKvc, const uint8_t issuerKif, const uint8_t issuerKvc)=0 |
![]() | |
virtual std::shared_ptr< CardTransactionCryptoExtension > | getCryptoExtension (const std::type_info &cryptoExtensionClass)=0 |
virtual SecureTransactionManager & | prepareCloseSecureSession ()=0 |
virtual SecureTransactionManager & | prepareCancelSecureSession ()=0 |
Contains operations common to all card transactions secured by "symmetric" key cryptographic algorithms.
See SecureTransactionManager parent interface for more information and details of available card operations.
<T> | The type of the lowest level child object. |
Definition at line 34 of file SecureSymmetricCryptoTransactionManager.hpp.
|
pure virtual |
Schedules the execution of "Change Key" command to replace one of the current card keys with another key present in the cryptographic module.
This command can be performed only out of a secure session.
The change key process transfers the key from the cryptographic module to the card. The new key is diversified by the cryptographic module from a primary key and encrypted using the indicated issuer key to secure the transfer to the card. All provided KIFs and KVCs must be present in the cryptographic module.
keyIndex | The index of the key to be replaced (1 for the issuer key, 2 for the load key, 3 for the debit key). |
newKif | The KIF of the new key. |
newKvc | The KVC of the new key. |
issuerKif | The KIF of the current card's issuer key. |
issuerKvc | The KVC of the current card's issuer key. |
UnsupportedOperationException | If the Change Key command is not available for this card. |
IllegalArgumentException | If the provided key index is out of range. |
IllegalStateException | If the command is executed while a secure session is open. |
|
pure virtual |
Schedules the execution of an "Invalidate" command.
This command is usually executed within a secure session with the DEBIT key (depends on the access rights given to this command in the file structure of the card).
The DF status will be available in CalypsoCard using the CalypsoCard#isDfInvalidated() method.
IllegalStateException | If the card is already invalidated. |
SessionBufferOverflowException | If the command will overflow the modifications buffer size and the multiple session is not allowed. |
|
pure virtual |
Schedules the execution of an "Open Secure Session" command.
The secure session will be opened with the provided WriteAccessLevel depending on whether it is a personalization, reload or debit transaction profile.
Note that if the next prepared command is a "Read One Record" or "Read One Or More Counters", then it will by default be merged with the "Open Secure Session" command for optimization purposes except if the "pre-open" mode is active.
This mechanism may in some cases be incompatible with the security constraints and can be disabled via the SymmetricCryptoSecuritySetting#disableReadOnSessionOpening() method.
writeAccessLevel | The write access level to be used. |
IllegalArgumentException | If the provided argument is null. |
IllegalStateException | In the following cases:
|
|
pure virtual |
Schedules the execution of a "Rehabilitate" command.
This command is usually executed within a secure session with the PERSONALIZATION key (depends on the access rights given to this command in the file structure of the card).
The DF status will be available in CalypsoCard using the CalypsoCard#isDfInvalidated() method.
IllegalStateException | If the card is not invalidated. |
SessionBufferOverflowException | If the command will overflow the modifications buffer size and the multiple session is not allowed. |
|
pure virtual |
Schedules the execution of a "SV Debit" or "SV Undebit" command to increase the current SV balance or to partially or totally cancels the last SV debit command.
It consists in decreasing the current balance of the SV by a certain amount or canceling a previous debit.
Data will be available in CalypsoCard using the dedicated SV data management methods.
Note 1: the optional SV additional data are set to zero.
Note 2: the key used is the debit key.
amount | The amount to be subtracted or added, positive integer in the range 0..32767 when subtracted and 0..32768 when added. |
IllegalArgumentException | If one of the provided argument is out of range. |
IllegalStateException | In one of the following cases:
|
SessionBufferOverflowException | If the command will overflow the modifications buffer size and the multiple session is not allowed. |
|
pure virtual |
Schedules the execution of a "SV Debit" or "SV Undebit" command to increase the current SV balance or to partially or totally cancels the last SV debit command and using the provided additional data.
It consists in decreasing the current balance of the SV by a certain amount or canceling a previous debit according to the type operation chosen in when invoking the previous SV Get command.
Data will be available in CalypsoCard using the dedicated SV data management methods.
Note 1: the key used is the debit key
amount | The amount to be subtracted or added, positive integer in the range 0..32767 when subtracted and 0..32768 when added. |
date | 2-byte free value. |
time | 2-byte free value. |
IllegalArgumentException | If one of the provided argument is out of range. |
IllegalStateException | In one of the following cases:
|
SessionBufferOverflowException | If the command will overflow the modifications buffer size and the multiple session is not allowed. |
|
pure virtual |
Schedules the execution of a "SV Get" command to prepare an SV operation or simply retrieves the current SV status.
Data will be available in CalypsoCard using the dedicated SV data management methods.
svOperation | Informs about the nature of the intended operation: debit or reload. |
svAction | The type of action: DO a debit or a positive reload, UNDO an undebit or a negative reload. |
UnsupportedOperationException | If the SV feature is not available for this card. |
IllegalArgumentException | If one of the arguments is null. |
|
pure virtual |
Schedules the execution of a "SV Reload" command to increase the current SV balance.
Data will be available in CalypsoCard using the dedicated SV data management methods.
Note 1: the optional SV additional data are set to zero.
Note 2: the key used is the reload key.
amount | The value to be reloaded, positive integer in the range 0..8388607 for a DO. action, in the range 0..8388608 for an UNDO action. |
IllegalArgumentException | If the provided argument is out of range. |
IllegalStateException | In one of the following cases:
|
SessionBufferOverflowException | If the command will overflow the modifications buffer size and the multiple session is not allowed. |
|
pure virtual |
Schedules the execution of a "SV Reload" command to increase the current SV balance and using the provided additional data.
Data will be available in CalypsoCard using the dedicated SV data management methods.
Note: the key used is the reload key.
amount | The value to be reloaded, positive or negative integer in the range. -8388608..8388607 |
date | 2-byte free value. |
time | 2-byte free value. |
free | 2-byte free value. |
IllegalArgumentException | If one of the provided argument is out of range. |
IllegalStateException | In one of the following cases:
|
SessionBufferOverflowException | If the command will overflow the modifications buffer size and the multiple session is not allowed. |