21#include "IllegalArgumentException.h"
27using namespace keyple::core::util;
31const std::map<const int, const std::shared_ptr<StatusProperties>>
32 CmdSamDigestClose::STATUS_TABLE = initStatusTable();
35 const uint8_t expectedResponseLength)
38 if (expectedResponseLength != 0x04 && expectedResponseLength != 0x08) {
39 throw IllegalArgumentException(
"Bad digest length! Expected 4 or 8, got " +
40 std::to_string(expectedResponseLength));
44 const uint8_t p1 = 0x00;
45 const uint8_t p2 = 0x00;
48 std::make_shared<ApduRequestAdapter>(
57const std::map<const int, const std::shared_ptr<StatusProperties>>
58 CmdSamDigestClose::initStatusTable()
60 std::map<const int, const std::shared_ptr<StatusProperties>> m =
64 std::make_shared<StatusProperties>(
"Preconditions not satisfied.",
70const std::map<const int, const std::shared_ptr<StatusProperties>>&
virtual const std::shared_ptr< ApduResponseApi > getApduResponse() const final
virtual bool isSuccessful() const final
virtual void setApduRequest(const std::shared_ptr< ApduRequestAdapter > apduRequest) final
static const std::map< const int, const std::shared_ptr< StatusProperties > > STATUS_TABLE
static const CalypsoSamCommand DIGEST_CLOSE
uint8_t getInstructionByte() const override
CmdSamDigestClose(const CalypsoSam::ProductType productType, const uint8_t expectedResponseLength)
const std::map< const int, const std::shared_ptr< StatusProperties > > & getStatusTable() const override
const std::vector< uint8_t > getSignature() const
static uint8_t getClassByte(const ProductType productType)
CalypsoSam::ProductType ProductType