LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
tripledeskey.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_TRIPLEDESKEY_HPP
8#define LOGICALACCESS_TRIPLEDESKEY_HPP
9
10#include <logicalaccess/key.hpp>
11
15#define TRIPLEDES_KEY_SIZE 16
16
17namespace logicalaccess
18{
22class LLA_CORE_API TripleDESKey : public Key
23{
24 public:
25 using XmlSerializable::serialize;
26 using XmlSerializable::unSerialize;
27
32
33 virtual ~TripleDESKey() = default;
34
39 explicit TripleDESKey(const std::string &str);
40
46 TripleDESKey(const void *buf, size_t buflen);
47
52 size_t getLength() const override
53 {
54 return TRIPLEDES_KEY_SIZE;
55 }
56
61 const unsigned char *getData() const override
62 {
63 return d_key;
64 }
65
70 unsigned char *getData() override
71 {
72 return d_key;
73 }
74
80 void serialize(boost::property_tree::ptree &parentNode) override;
81
86 void unSerialize(boost::property_tree::ptree &node) override;
87
92 std::string getDefaultXmlNodeName() const override;
93
94 private:
98 unsigned char d_key[TRIPLEDES_KEY_SIZE];
99};
100}
101
102#endif /* LOGICALACCESS_TRIPLEDESKEY_HPP */
A Key base class. The key object is used to describe key chip information used for authentication on ...
Definition: key.hpp:22
A triple DES class.
Definition: tripledeskey.hpp:23
virtual ~TripleDESKey()=default
const unsigned char * getData() const override
Get the key data.
Definition: tripledeskey.hpp:61
size_t getLength() const override
Get the key length.
Definition: tripledeskey.hpp:52
unsigned char * getData() override
Get the key data.
Definition: tripledeskey.hpp:70
Definition: asn1.hpp:9
#define TRIPLEDES_KEY_SIZE
The default triple des key size.
Definition: tripledeskey.hpp:15