Keyple Card Calypso C++ Library 2.1.0
Reference Terminal Reader API for C++
CalypsoSamCommand.cpp
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#include "CalypsoSamCommand.h"
14
15#include <cstdint>
16#include <string>
17
18/* Keyple Card Calypso */
19#include "CardCommand.h"
20
21namespace keyple {
22namespace card {
23namespace calypso {
24
25const CalypsoSamCommand CalypsoSamCommand::SELECT_DIVERSIFIER("Select Diversifier", 0x14);
26const CalypsoSamCommand CalypsoSamCommand::GET_CHALLENGE("Get Challenge", 0x84);
27const CalypsoSamCommand CalypsoSamCommand::DIGEST_INIT("Digest Init", 0x8A);
28const CalypsoSamCommand CalypsoSamCommand::DIGEST_UPDATE("Digest Update", 0x8C);
29const CalypsoSamCommand CalypsoSamCommand::DIGEST_UPDATE_MULTIPLE("Digest Update Multiple", 0x8C);
30const CalypsoSamCommand CalypsoSamCommand::DIGEST_CLOSE("Digest Close", 0x8E);
31const CalypsoSamCommand CalypsoSamCommand::DIGEST_AUTHENTICATE("Digest Authenticate", 0x82);
32const CalypsoSamCommand CalypsoSamCommand::GIVE_RANDOM("Give Random", 0x86);
33const CalypsoSamCommand CalypsoSamCommand::CARD_GENERATE_KEY("Card Generate Key", 0x12);
34const CalypsoSamCommand CalypsoSamCommand::CARD_CIPHER_PIN("Card Cipher PIN", 0x12);
35const CalypsoSamCommand CalypsoSamCommand::UNLOCK("Unlock", 0x20);
36const CalypsoSamCommand CalypsoSamCommand::WRITE_KEY("Write Key", 0x1A);
37const CalypsoSamCommand CalypsoSamCommand::READ_KEY_PARAMETERS("Read Key Parameters", 0xBC);
38const CalypsoSamCommand CalypsoSamCommand::READ_EVENT_COUNTER("Read Event Counter", 0xBE);
39const CalypsoSamCommand CalypsoSamCommand::READ_CEILINGS("Read Ceilings", 0xBE);
40const CalypsoSamCommand CalypsoSamCommand::SV_CHECK("SV Check", 0x58);
41const CalypsoSamCommand CalypsoSamCommand::SV_PREPARE_DEBIT("SV Prepare Debit", 0x54);
42const CalypsoSamCommand CalypsoSamCommand::SV_PREPARE_LOAD("SV Prepare Load", 0x56);
43const CalypsoSamCommand CalypsoSamCommand::SV_PREPARE_UNDEBIT("SV Prepare Undebit", 0x5C);
44
45CalypsoSamCommand::CalypsoSamCommand(const std::string& name, const uint8_t instructionByte)
46: mName(name), mInstructionByte(instructionByte) {}
47
48const std::string& CalypsoSamCommand::getName() const
49{
50 return mName;
51}
52
53uint8_t CalypsoSamCommand::getInstructionByte() const
54{
55 return mInstructionByte;
56}
57
58}
59}
60}
static const CalypsoSamCommand CARD_CIPHER_PIN
static const CalypsoSamCommand READ_EVENT_COUNTER
static const CalypsoSamCommand SV_CHECK
static const CalypsoSamCommand SV_PREPARE_DEBIT
static const CalypsoSamCommand SV_PREPARE_UNDEBIT
static const CalypsoSamCommand DIGEST_UPDATE_MULTIPLE
static const CalypsoSamCommand SELECT_DIVERSIFIER
static const CalypsoSamCommand DIGEST_AUTHENTICATE
static const CalypsoSamCommand CARD_GENERATE_KEY
static const CalypsoSamCommand DIGEST_INIT
static const CalypsoSamCommand GIVE_RANDOM
static const CalypsoSamCommand DIGEST_UPDATE
static const CalypsoSamCommand WRITE_KEY
static const CalypsoSamCommand DIGEST_CLOSE
static const CalypsoSamCommand UNLOCK
static const CalypsoSamCommand SV_PREPARE_LOAD
static const CalypsoSamCommand GET_CHALLENGE
static const CalypsoSamCommand READ_CEILINGS
static const CalypsoSamCommand READ_KEY_PARAMETERS