LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
seoskey.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_SEOSKEY_HPP
8#define LOGICALACCESS_SEOSKEY_HPP
9
10#include <logicalaccess/key.hpp>
11#include <logicalaccess/plugins/cards/seos/lla_cards_seos_api.hpp>
12
16#define SEOS_KEY_SIZE 16
17
18namespace logicalaccess
19{
23typedef enum
24{
26 SEOS_KEY_AES = 0x40
28
32class LLA_CARDS_SEOS_API SeosKey : public Key
33{
34 public:
35#ifndef SWIG
36 using XmlSerializable::serialize;
37 using XmlSerializable::unSerialize;
38#endif
39
43 SeosKey();
44
49 explicit SeosKey(const std::string &str);
50
56 SeosKey(const void *buf, size_t buflen);
57
62 size_t getLength() const override;
63
68 const unsigned char *getData() const override
69 {
70 return &d_key[0];
71 }
72
77 unsigned char *getData() override
78 {
79 return &d_key[0];
80 }
81
86 void setKeyType(SeosKeyType keyType);
87
93 {
94 return d_keyType;
95 }
96
101 void serialize(boost::property_tree::ptree &parentNode) override;
102
107 void unSerialize(boost::property_tree::ptree &node) override;
108
113 std::string getDefaultXmlNodeName() const override;
114
120 virtual bool operator==(const SeosKey &key) const;
121
127 bool operator!=(const SeosKey &key) const
128 {
129 return !operator==(key);
130 }
131
136 static std::string SeosKeyTypeStr(SeosKeyType t);
137
138 private:
143
148};
149}
150
151#endif /* LOGICALACCESS_SEOSKEY_HPP */
A Key base class. The key object is used to describe key chip information used for authentication on ...
Definition: key.hpp:22
A SEOS Key class.
Definition: seoskey.hpp:33
SeosKeyType getKeyType() const
Get the key type.
Definition: seoskey.hpp:92
SeosKeyType d_keyType
The SEOS key type.
Definition: seoskey.hpp:147
unsigned char * getData() override
Get the key data.
Definition: seoskey.hpp:77
bool operator!=(const SeosKey &key) const
Inequality operator.
Definition: seoskey.hpp:127
const unsigned char * getData() const override
Get the key data.
Definition: seoskey.hpp:68
ByteVector d_key
The key bytes;.
Definition: seoskey.hpp:142
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Definition: asn1.hpp:9
SeosKeyType
The SEOS key type.
Definition: seoskey.hpp:24
@ SEOS_KEY_AES
Definition: seoskey.hpp:26
@ SEOS_KEY_DES
Definition: seoskey.hpp:25