LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
desfirechip.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_DESFIRECHIP_HPP
8#define LOGICALACCESS_DESFIRECHIP_HPP
9
13
14#include <string>
15#include <vector>
16#include <iostream>
17
18namespace logicalaccess
19{
20#define CHIP_DESFIRE "DESFire"
21
25class LLA_CARDS_DESFIRE_API DESFireChip : public Chip
26{
27 public:
32
37 explicit DESFireChip(std::string ct);
38
42 virtual ~DESFireChip();
43
48 std::string getGenericCardType() const override
49 {
50 return CHIP_DESFIRE;
51 }
52
57 std::shared_ptr<LocationNode> getRootLocationNode() override;
58
63 virtual std::shared_ptr<DESFireLocation> getApplicationLocation();
64
70 std::shared_ptr<CardService> getService(CardServiceType serviceType) override;
71
76 std::shared_ptr<AccessInfo> createAccessInfo() const override;
77
82 std::shared_ptr<Location> createLocation() const override;
83
88 std::shared_ptr<DESFireCommands> getDESFireCommands() const
89 {
90 return std::dynamic_pointer_cast<DESFireCommands>(getCommands());
91 }
92
93
98 void setHasRealUID(bool enabled)
99 {
100 has_real_uid_ = enabled;
101 }
102
109 bool hasRealUID() const
110 {
111 return has_real_uid_;
112 }
113
118 std::shared_ptr<DESFireCrypto> getCrypto() const
119 {
120 return d_crypto;
121 }
122
127 void setCrypto(std::shared_ptr<DESFireCrypto> crypto)
128 {
129 d_crypto = crypto;
130 }
131
132 protected:
136 std::shared_ptr<DESFireCrypto> d_crypto;
137
143};
144}
145
146#endif /* LOGICALACCESS_DESFIRECHIP_HPP */
Chip descriptor.
The base chip class for all chip. Each chip have is own object and providers according to himself and...
Definition: chip.hpp:37
The DESFire base chip class.
Definition: desfirechip.hpp:26
std::shared_ptr< DESFireCrypto > getCrypto() const
Get the internal DESFire crypto.
Definition: desfirechip.hpp:118
bool has_real_uid_
Definition: desfirechip.hpp:142
std::string getGenericCardType() const override
Get the generic card type.
Definition: desfirechip.hpp:48
void setCrypto(std::shared_ptr< DESFireCrypto > crypto)
Set the internal DESFire crypto.
Definition: desfirechip.hpp:127
std::shared_ptr< DESFireCrypto > d_crypto
Crypto instance for security manipulation.
Definition: desfirechip.hpp:136
void setHasRealUID(bool enabled)
Definition: desfirechip.hpp:98
std::shared_ptr< DESFireCommands > getDESFireCommands() const
Get the DESFire commands.
Definition: desfirechip.hpp:88
bool hasRealUID() const
Definition: desfirechip.hpp:109
#define CHIP_DESFIRE
Definition: desfirechip.hpp:20
DESFire commands.
DESFireCrypto.
Definition: asn1.hpp:9
CardServiceType
The card services.
Definition: cardservice.hpp:35