LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
desfirelocation.hpp
Go to the documentation of this file.
1
7#ifndef LOGICALACCESS_DESFIRELOCATION_HPP
8#define LOGICALACCESS_DESFIRELOCATION_HPP
9
12
13namespace logicalaccess
14{
18typedef enum {
19 CM_PLAIN = 0x00,
20 CM_MAC = 0x01,
21 CM_ENCRYPT = 0x03,
22 CM_UNKNOWN = 0xFF
24
28class LLA_CARDS_DESFIRE_API DESFireLocation : public Location
29{
30 public:
35
39 virtual ~DESFireLocation();
40
46 static unsigned int convertAidToUInt(const ByteVector &aid);
47
53 static void convertUIntToAid(unsigned int i, ByteVector &aid);
54
59 void serialize(boost::property_tree::ptree &parentNode) override;
60
65 void unSerialize(boost::property_tree::ptree &node) override;
66
71 std::string getDefaultXmlNodeName() const override;
72
77 std::string getCardType() override
78 {
79 return "DESFire";
80 }
81
82 void incrementOffset(int increment) override;
83
89 bool operator==(const Location &location) const override;
90
94 unsigned int aid;
95
99 unsigned char file;
100
104 unsigned int byte_;
105
110};
111}
112
113#endif /* LOGICALACCESS_DESFIRELOCATION_HPP */
A DESFire location informations.
Definition: desfirelocation.hpp:29
EncryptionMode securityLevel
The file security level.
Definition: desfirelocation.hpp:109
unsigned char file
The file ID.
Definition: desfirelocation.hpp:99
unsigned int byte_
The byte offset.
Definition: desfirelocation.hpp:104
std::string getCardType() override
Get the card type for this location.
Definition: desfirelocation.hpp:77
unsigned int aid
The application ID.
Definition: desfirelocation.hpp:94
A location informations.
Definition: location.hpp:19
DESFire key.
std::vector< uint8_t > ByteVector
Definition: lla_fwd.hpp:80
Location.
Definition: asn1.hpp:9
EncryptionMode
The file communication mode (or encryption mode)
Definition: desfirelocation.hpp:18
@ CM_PLAIN
Definition: desfirelocation.hpp:19
@ CM_UNKNOWN
Definition: desfirelocation.hpp:22
@ CM_ENCRYPT
Definition: desfirelocation.hpp:21
@ CM_MAC
Definition: desfirelocation.hpp:20