#include <CardBase.h>
Inheritance diagram for CardBase:
Public Member Functions | |
CardBase (ManagerInterface &ref) | |
Constructor, call connect() to connect card to a reader. | |
CardBase (ManagerInterface &ref, unsigned int idx) | |
Constructor, connects the card instance to the reader at index idx. | |
CardBase (ManagerInterface &ref, ConnectionBase *conn) | |
Constructor, connects the card instance to existing connection. | |
void | connect (unsigned int idx, bool forceT0=false) |
connects the card instance to the reader at index idx | |
virtual bool | isInReader (unsigned int idx) |
virtual to be overridden by concrete cards, that can check for ATR or other card specific data | |
void | setLogging (std::ostream *logStream) |
set logging stream. set to NULL for no logging ( default ) | |
void | endTransaction () |
sigh .. just a hack to reset card in some instances | |
Protected Member Functions | |
ByteVec | getTag (int identTag, int len, ByteVec &arr) |
helper to parse returned TLVs from card | |
FCI | parseFCI (ByteVec fci) |
Parses a File Control Infromation block from select file commands. | |
FCI | selectMF (bool ignoreFCI=false) |
Selects the Master File on card. | |
int | selectDF (int fileID, bool ignoreFCI=false) |
Selects Data File given by two-byte fileID. | |
FCI | selectEF (int fileID, bool ignoreFCI=false) |
Selects Elementary File given by two-byte fileID. | |
ByteVec | readRecord (int numrec) |
Reads a record from record-based Elementary File. | |
ByteVec | readEF (unsigned int fileLen) |
Read entire binary Elementary File. | |
virtual ByteVec | execute (ByteVec cmd, bool noreply=false) |
perform a basic APDU command. noreply indicates that command expects no reply data apart from status bytes | |
virtual void | executePinEntry (ByteVec cmd) |
perform pin entry command. this is only useful if card manager supports direct pin entry from reader like CTAPI | |
virtual void | executePinChange (ByteVec cmd, size_t oldPinLen, size_t newPinLen) |
perform pin change command. useful if card manager supports direct pin entry | |
Protected Attributes | |
CardBase::FCI | LPFCI |
File Control Info structure, parsed. | |
ManagerInterface & | mManager |
ConnectionBase * | mConnection |
std::ostream * | mLogger |
Classes | |
struct | FCI |
File Control Info structure, parsed. More... |
Represents a basic smart card, with basic ISO7816-4 command set implemented Concrete instances of smart cards with appropriate services can be derived from it or it can be used directly with basic command set.