LibLogicalAccess
2.5.0
An Open Source RFID Library
|
#include <atrparser.hpp>
Classes | |
struct | ATRInfo |
Public Member Functions | |
ATRParser (const ByteVector &atr) | |
Static Public Member Functions | |
static std::string | guessCardType (const ByteVector &atr, PCSCReaderUnitType reader_type) |
static std::string | guessCardType (uint8_t *atr, size_t atrlen, PCSCReaderUnitType reader_type) |
static std::string | guessCardType (const std::string &atr_str, PCSCReaderUnitType reader_type) |
static std::string | guessCardType (const ByteVector &atr) |
static std::string | guessCardType (uint8_t *atr, size_t atrlen) |
static std::string | guessCardType (const std::string &atr_str) |
Private Member Functions | |
std::string | parse (bool ignore_reader_type, const PCSCReaderUnitType &reader_type) const |
std::string | check_hardcoded (bool ignore_reader_type, const PCSCReaderUnitType &reader_type) const |
std::string | check_from_atr () const |
std::string | check_generic_from_atr () const |
void | register_hardcoded_atr (const std::string &atr, const std::string &card_type, PCSCReaderUnitType reader_type) |
void | register_hardcoded_atr (const std::string &atr, const std::string &card_type) |
Static Private Member Functions | |
static std::string | atr_x_to_type (uint8_t code) |
Private Attributes | |
ByteVector | atr_ |
std::map< ByteVector, ATRInfo > | hardcoded_atr_to_type_ |
An helper class that helps deducing the type of card from its ATR.
|
explicit |
|
staticprivate |
Deduce the card type from one byte of the ATR.
|
private |
|
private |
|
private |
|
static |
Guess the card type from an ATR that works for any reader type.
Boilerplate to prepare the proper call to parse()
|
static |
Guess the card type from an ATR for a specific reader.
|
static |
Guess the card from an hexadecimal string representation of the ATR.
|
static |
Guess the card from an hexadecimal string representation of the ATR.
|
static |
|
static |
|
private |
ATR Parsing code
|
private |
Register an harcoded ATR acceptable for any reader.
Hardcoded ATR related code
|
private |
Register an hardcoded ATR.
The ATR will be register for a unique type of PCSC Reader.
|
private |
|
private |
A map mapping ATR hexadecimal representation to the type of card they represent.