#include <hbcicard.h>
Inheritance diagram for HBCICard:
Public Member Functions | |
Constructors/Destructor | |
Methods to retrieve the private members of this class. | |
HBCICard (const CTCard &c) | |
~HBCICard () | |
Opening and closing operations | |
Methods to connect and disconnect the card. Most other methods only work if the card is open. | |
virtual CTError | reopenCard () |
virtual CTError | openCard () |
virtual CTError | closeCard (bool force=false) |
Informational methods | |
These methods tell you about the type and the status of the card. | |
virtual string | cardType () |
virtual string | cardTypes () |
string | cardNumber () |
Card Data Methods | |
These methods return information about the HBCI card. | |
CardData | getCardId () |
CTError | getCID (string &cid) |
Institute Data Methods | |
These methods return information about institutes stored on the card. | |
instituteData | getInstituteData (int num) |
CTError | getInstituteData (int num, instituteData &idata) |
CTError | putInstituteData (int num, const instituteData &d) |
Pin Verification Methods | |
These methods let you verify the pin with the card. | |
CTError | verifyPin (const string &pin) |
CTError | verifyPin () |
Key Information Methods | |
These methods return information about the keys stored on the card. | |
bool | getKeyVersion (int key, int &kv) |
bool | getCryptKeyNumber (int &kn) |
bool | getSignKeyNumber (int &kn) |
Cryptographic Methods | |
These methods are involved in en-/decryption. | |
bool | hash2MAC (string &hash, string &mac) |
bool | getRandom (string &d) |
bool | cryptBlock (string &src, string &dst) |
Sequence Counter Methods | |
These methods allow reading and writing of the cards sequence counter. This counter is to be incremented after signing a HBCI message. | |
bool | readSEQ (unsigned int &d) |
bool | writeSEQ (unsigned int d) |
This class provides easy access to HBCI cards. You may read and write from/to those cards. DDV cards of type 0 and of type 1 are supported. This class does not support RSA cards (like G&D cards).
|
|
|
|
|
This method returns the cardnumber. This number is quite unique.
|
|
This method returns a short name of the class which handles this card. A HBCI card for example returns "HBCICard". So you can use this method to check for the type of the card. Reimplemented from CTProcessorCard. |
|
This method returns a comma separated list of all card types this card inherits including the type of this card, e.g. a HBCI card would return "CTProcessorCard, HBCICard". If you overload this method in your own class (you SHOULD) you simply have to call this method of the class it directly inherits. That class will then do the same, so that there is a list upon return. Reimplemented from CTProcessorCard. |
|
Call this if you have finished working with the card. After this method is called you may safely remove the card from the reader.
Reimplemented from CTCard. |
|
Crypts a block of 8 bytes. It uses the encrypting function of the chip card. That means if you crypt a block twice with this method here you do NOT get the clear text again !
|
|
Gets the card's id struct and selects the appropriate DF_BANKING or DF_BANKING_20 DF. May throw an CTError.
|
|
Reads the full EF_ID file from the MF of the chip card. Is needed by HBCI.
|
|
Returns the key number of the crypt key (with 1 being the first)
|
|
This is a non-exception version, it is temporarily used be OpenHBCI. |
|
Gets you the institute data struct for the given entry. The HBCI card stores up to 5 entries with number 1 being the first. You have to VERIFY your pin prior to calling this method !
|
|
Returns the version of a the local EF_KEY (that is that EF_KEY which resides in the currently selected DF).
|
|
Creates random data (8 bytes).
|
|
Returns the key number of the sign key (with 1 being the first)
|
|
Creates a MAC from a 20 byte hash. According to HBCI standard this has to be a RIPEMD-160 hash.
|
|
Opens the card for usage. This way the card is powered on. This method does some basic checks and retrieves basic information about the card (whether it is a memory card or a processor card, the size of the memory etc). When this method successfully returns the card may be used.
Reimplemented from CTCard. |
|
This writes the given institute data to the card. Of course it has to be open for this and you have to have verified your pin with the card.
|
|
Reads the sequence counter from the chipcard. This counter should be incremented before signing a HBCI message. This method is only available to call after inserting the card.
|
|
When this method is called normally the card is already opened by means of openCard(). However, it is likely that openCard() has been called assuming this card is only a CTCard() object, nothing special. You may then call THIS method here on all known card classes to check for the type of this card. This method must assume that any file on the card is already selected, so it is in most cases a good idea to select the MF as the first action of this method. If the executing class finds that the card inserted is not of a type it can handle then it MUST return an error. Reimplemented from CTProcessorCard. |
|
This method lets the user enter the pin via the pin pad.
|
|
Verifies your pin with the ec card.
|
|
Stores the value of the sequence counter which is stored in this class at this moment. Call this after incrementing this value !
|