7#ifndef LOGICALACCESS_SAMBASICKEYENTRY_HPP
8#define LOGICALACCESS_SAMBASICKEYENTRY_HPP
11#include <logicalaccess/plugins/cards/samav/lla_cards_samav_api.hpp>
16#define SAM_DES_KEY_SIZE 16
21#define SAM_AES_KEY_SIZE 16
26#define SAM_MAXKEY_SIZE 24
84 size_t getLength()
const;
90 std::vector<ByteVector> getKeysData()
const;
95 virtual void setKeysData(std::vector<ByteVector> keys,
SAMKeyType type);
112 d_diversify = diversify;
146 virtual void serialize(boost::property_tree::ptree &parentNode);
152 virtual void unSerialize(boost::property_tree::ptree &node);
158 virtual std::string getDefaultXmlNodeName()
const;
174 return !operator==(key);
181 static std::string SAMKeyEntryTypeStr(
SAMKeyType t);
183 size_t getSingleLength()
const;
203 const std::string &str2);
A SAMBasicKeyEntry Key class.
Definition: sambasickeyentry.hpp:73
void setUpdateMask(unsigned char c)
Definition: sambasickeyentry.hpp:189
unsigned char * getData() const
Get the key data.
Definition: sambasickeyentry.hpp:101
SAMKeyType d_keyType
The SAM key type.
Definition: sambasickeyentry.hpp:220
unsigned char getUpdateMask() const
Definition: sambasickeyentry.hpp:185
SAMKeyType getKeyType() const
Get the key type.
Definition: sambasickeyentry.hpp:137
bool d_diversify
Diversify the key on the card.
Definition: sambasickeyentry.hpp:215
bool getDiversify() const
Get if the key is diversified on the card.
Definition: sambasickeyentry.hpp:119
unsigned char d_updatemask
Definition: sambasickeyentry.hpp:222
unsigned char * d_key
The key bytes;.
Definition: sambasickeyentry.hpp:210
void setDiversify(bool diversify)
Set if the key is diversified on the card.
Definition: sambasickeyentry.hpp:110
void setKeyType(SAMKeyType keyType)
Set the key type.
Definition: sambasickeyentry.hpp:128
bool operator!=(const SAMBasicKeyEntry &key) const
Inequality operator.
Definition: sambasickeyentry.hpp:172
SAMKeyType
The SAM key type.
Definition: sambasickeyentry.hpp:33
@ SAM_KEY_AES
Definition: sambasickeyentry.hpp:33
@ SAM_KEY_DES
Definition: sambasickeyentry.hpp:33
@ SAM_KEY_3K3DES
Definition: sambasickeyentry.hpp:33
struct logicalaccess::s_KeyEntryUpdateSettings KeyEntryUpdateSettings
struct logicalaccess::s_changeKeyDiversification ChangeKeyDiversification
struct logicalaccess::s_changeKeyInfo ChangeKeyInfo
NXPKeyDiversificationType
Definition: sambasickeyentry.hpp:58
@ SAMAV1
Definition: sambasickeyentry.hpp:58
@ NO_DIV
Definition: sambasickeyentry.hpp:58
@ SAMAV2
Definition: sambasickeyentry.hpp:58
Definition: sambasickeyentry.hpp:36
unsigned char refkeykuc
Definition: sambasickeyentry.hpp:42
unsigned char key_no_v_cek
Definition: sambasickeyentry.hpp:41
unsigned char keyVb
Definition: sambasickeyentry.hpp:38
unsigned char updateset
Definition: sambasickeyentry.hpp:43
unsigned char keyversionsentseparatly
Definition: sambasickeyentry.hpp:44
unsigned char keyVc
Definition: sambasickeyentry.hpp:39
unsigned char keyVa
Definition: sambasickeyentry.hpp:37
unsigned char df_aid_keyno
Definition: sambasickeyentry.hpp:40
Definition: sambasickeyentry.hpp:61
unsigned char * divInput
Definition: sambasickeyentry.hpp:63
NXPKeyDiversificationType divType
Definition: sambasickeyentry.hpp:62
unsigned char diversifyNew
Definition: sambasickeyentry.hpp:66
unsigned char diversifyCurrent
Definition: sambasickeyentry.hpp:65
unsigned char divInputSize
Definition: sambasickeyentry.hpp:64
Definition: sambasickeyentry.hpp:48
unsigned char newKeySlotV
Definition: sambasickeyentry.hpp:55
unsigned char oldKeyInvolvement
Definition: sambasickeyentry.hpp:51
unsigned char newKeySlotNo
Definition: sambasickeyentry.hpp:54
unsigned char desfireNumber
Definition: sambasickeyentry.hpp:49
unsigned char currentKeySlotV
Definition: sambasickeyentry.hpp:53
unsigned char currentKeySlotNo
Definition: sambasickeyentry.hpp:52
unsigned char isMasterKey
Definition: sambasickeyentry.hpp:50