Keyple Util C++ Library 2.0.0
Reference Terminal Reader API for C++
ApduUtil.h
Go to the documentation of this file.
1/**************************************************************************************************
2 * Copyright (c) 2021 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#include <cstdint>
16#include <vector>
17
18/* Keyple Core Util */
19#include "KeypleUtilExport.h"
20
21namespace keyple {
22namespace core {
23namespace util {
24
31public:
45 static const std::vector<uint8_t> build(const uint8_t cla,
46 const uint8_t ins,
47 const uint8_t p1,
48 const uint8_t p2,
49 const std::vector<uint8_t>& dataIn,
50 const uint8_t le);
51
63 static const std::vector<uint8_t> build(const uint8_t cla,
64 const uint8_t ins,
65 const uint8_t p1,
66 const uint8_t p2,
67 const std::vector<uint8_t>& dataIn);
68
81 static const std::vector<uint8_t> build(const uint8_t cla,
82 const uint8_t ins,
83 const uint8_t p1,
84 const uint8_t p2,
85 const uint8_t le);
86
97 static const std::vector<uint8_t> build(const uint8_t cla,
98 const uint8_t ins,
99 const uint8_t p1,
100 const uint8_t p2);
101
110 static std::vector<uint8_t> allocateBuffer(const std::vector<uint8_t>& data, const uint8_t le);
111
119 static std::vector<uint8_t> allocateBuffer(const std::vector<uint8_t>& data);
120
128 static std::vector<uint8_t> allocateBuffer(const uint8_t le);
129
136 static std::vector<uint8_t> allocateBuffer();
137
163 static bool isCase4(const std::vector<uint8_t>& apduCommand);
164
165private:
170 ApduUtil();
171};
172
173}
174}
175}
#define KEYPLEUTIL_API