Keypop Calypso Card C++ API - 2.2.0
Component of the Keypop C++ API
SecureSymmetricCryptoTransactionManager.hpp
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2025 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * This program and the accompanying materials are made available under the *
5 * terms of the MIT License which is available at *
6 * https://opensource.org/licenses/MIT. *
7 * *
8 * SPDX-License-Identifier: MIT *
9 ******************************************************************************/
10
11#pragma once
12
13#include <vector>
14
19
20namespace keypop {
21namespace calypso {
22namespace card {
23namespace transaction {
24
35template <typename T>
37: public virtual SecureTransactionManager<T> {
38public:
69 virtual T& prepareOpenSecureSession(const WriteAccessLevel writeAccessLevel)
70 = 0;
71
89 virtual T&
90 prepareSvGet(const SvOperation svOperation, const SvAction svAction) = 0;
91
121 virtual T& prepareSvReload(
122 const int amount,
123 const std::vector<uint8_t>& date,
124 const std::vector<uint8_t>& time,
125 const std::vector<uint8_t>& free) = 0;
126
154 virtual T& prepareSvReload(const int amount) = 0;
155
190 virtual T& prepareSvDebit(
191 const int amount,
192 const std::vector<uint8_t>& date,
193 const std::vector<uint8_t>& time) = 0;
194
228 virtual T& prepareSvDebit(const int amount) = 0;
229
246 virtual T& prepareInvalidate() = 0;
247
264 virtual T& prepareRehabilitate() = 0;
265
294 const int keyIndex,
295 const uint8_t newKif,
296 const uint8_t newKvc,
297 const uint8_t issuerKif,
298 const uint8_t issuerKvc) = 0;
299};
300
301} /* namespace transaction */
302} /* namespace card */
303} /* namespace calypso */
304} /* namespace keypop */
Contains operations common to all card transactions secured by "symmetric" key cryptographic algorith...
virtual T & prepareSvGet(const SvOperation svOperation, const SvAction svAction)=0
Schedules the execution of a "SV Get" command to prepare an SV operation or simply retrieves the curr...
virtual T & prepareSvDebit(const int amount)=0
Schedules the execution of a "SV Debit" or "SV Undebit" command to increase the current SV balance or...
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
Schedules the execution of a "SV Reload" command to increase the current SV balance and using the pro...
virtual T & prepareChangeKey(const int keyIndex, const uint8_t newKif, const uint8_t newKvc, const uint8_t issuerKif, const uint8_t issuerKvc)=0
Schedules the execution of "Change Key" command to replace one of the current card keys with another ...
virtual T & prepareInvalidate()=0
Schedules the execution of an "Invalidate" command.
virtual T & prepareOpenSecureSession(const WriteAccessLevel writeAccessLevel)=0
Schedules the execution of an "Open Secure Session" command.
virtual T & prepareRehabilitate()=0
Schedules the execution of a "Rehabilitate" command.
virtual T & prepareSvReload(const int amount)=0
Schedules the execution of a "SV Reload" command to increase the current SV balance.
virtual T & prepareSvDebit(const int amount, const std::vector< uint8_t > &date, const std::vector< uint8_t > &time)=0
Schedules the execution of a "SV Debit" or "SV Undebit" command to increase the current SV balance or...
Contains operations common to all card transactions secured by cryptographic algorithms.
SvAction
Defines the type Stored Value of action.
Definition: SvAction.hpp:23
SvOperation
Defines the type of Stored Value operation to be performed.
Definition: SvOperation.hpp:23
WriteAccessLevel
Enumeration of the write access levels for the Calypso card Secure Session.