Keyple Card Calypso C++ Library 2.2.2
Reference Terminal Reader API for C++
TraceableSignatureComputationDataAdapter.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2022 Calypso Networks Association https://calypsonet.org/ *
3 * *
4 * See the NOTICE file(s) distributed with this work for additional information regarding *
5 * copyright ownership. *
6 * *
7 * This program and the accompanying materials are made available under the terms of the Eclipse *
8 * Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0 *
9 * *
10 * SPDX-License-Identifier: EPL-2.0 *
11 **************************************************************************************************/
12
13#pragma once
14
15/* Calypsonet Terminal Calypso */
16#include "TraceableSignatureComputationData.h"
17
18/* Keyple Card Calypso */
20
21namespace keyple {
22namespace card {
23namespace calypso {
24
25using namespace calypsonet::terminal::calypso::transaction;
26
34: public CommonSignatureComputationDataAdapter<TraceableSignatureComputationData>,
35 public TraceableSignatureComputationData {
36public:
42 TraceableSignatureComputationData& withSamTraceabilityMode(const int offset,
43 const bool usePartialSamSerialNumber)
44 override;
45
51 TraceableSignatureComputationData& withoutBusyMode() override;
52
58 const std::vector<uint8_t>& getSignedData() const override;
59
66 bool isSamTraceabilityMode() const;
67
76 bool isPartialSamSerialNumber() const;
77
85 int getTraceabilityOffset() const;
86
93 bool isBusyMode() const;
94
102 void setSignedData(const std::vector<uint8_t>& signedData);
103
104private:
108 bool mIsSamTraceabilityMode = false;
109
113 int mTraceabilityOffset = 0;
114
118 bool mIsPartialSamSerialNumber = false;
119
123 bool mIsBusyMode = true;
124
128 std::vector<uint8_t> mSignedData;
129
133 bool mSignedDataPresent = false;
134};
135
136}
137}
138}
TraceableSignatureComputationData & withSamTraceabilityMode(const int offset, const bool usePartialSamSerialNumber) override