#include <medium.h>
Inheritance diagram for HBCI::Medium:
Public Methods | |
Medium (const Hbci *hbci) | |
virtual | ~Medium () |
const Hbci * | hbci () const |
void | setOwner (Pointer< User > u) |
Pointer< User > | owner () |
Medium management | |
virtual Error | selectContext (int country, const string &instcode, const string &userid)=0 |
virtual Error | mountMedium (const string &pin="")=0 |
virtual Error | unmountMedium (const string &pin="")=0 |
virtual unsigned int | nextSEQ ()=0 |
virtual Error | changePIN ()=0 |
virtual Error | changeContext (int context, int country=0, const string instcode="", const string userid="", const string custid="", const string server="")=0 |
Medium information | |
virtual bool | isMounted ()=0 |
virtual string | mediumId () const=0 |
virtual int | securityMode () const=0 |
virtual const string & | mediumName () const=0 |
virtual MediumType | mediumType () const=0 |
virtual string | mediumTypeName () const=0 |
virtual int | signKeyNumber () const=0 |
virtual int | signKeyVersion () const=0 |
virtual int | cryptKeyNumber () const=0 |
virtual int | cryptKeyVersion () const=0 |
virtual Error | getContext (int num, int &countrycode, string &instcode, string &userid, string &server) const=0 |
Cryptographic methods | |
virtual string | createMessageKey () const=0 |
virtual string | encryptKey (const string &srckey)=0 |
virtual string | decryptKey (const string &srckey)=0 |
virtual Error | verify (const string &data, const string &signature)=0 |
virtual string | sign (const string &data)=0 |
virtual string | encrypt (const string &src, const string &key) |
virtual string | decrypt (const string &src, const string &key) |
Property handling | |
virtual Error | getProperty (const string &propertyName, string &propertyValue) |
virtual Error | setProperty (const string &propertyName, const string &propertyValue) |
Protected Methods | |
string | ripe (const string &source) |
Protected Attributes | |
const Hbci * | _hbci |
int | _version |
Pointer< User > | _owner |
This is the abstract base class for accessing security media. It is implemented by RSA file-based media and DES-based chip cards, or maybe even more. The actual type of this medium can be queried through Medium::securityMode.
|
|
|
|
|
Change data that is stored on the medium.
Implemented in HBCI::MediumRDHBase. |
|
Change the PIN that is used to protect the medium data. Implemented in HBCI::MediumRDHBase. |
|
Creates a key for encryption of data.
Implemented in HBCI::MediumRDHBase. |
|
Returns the number of the crypt key. RDH-media return the number of the institutes public crypt key.
Implemented in HBCI::MediumRDHBase. |
|
Returns the version of the crypt key. RDH-media return the version of the institutes public crypt key.
Implemented in HBCI::MediumRDHBase. |
|
Decrypt data.
|
|
Lets the medium decrypt the key.
Implemented in HBCI::MediumRDHBase. |
|
Encrypt data.
|
|
Lets the medium encrypt the key.
Implemented in HBCI::MediumRDHBase. |
|
Returns the context with the given number. Some media are able of storing multiple contexts (like chip cards). Please note that the medium has to be mounted prior to calling this method.
Implemented in HBCI::MediumRDHBase. |
|
Returns the value of a given property. If the property is not supported by the medium the error code HBCI_ERROR_CODE_UNKNOWN_PROPERTY will be returned. is returned. |
|
|
|
Checks whether the medium is mounted. This method checks whether the CORRECT medium is mounted and returns false if no medium or even the wrong medium is mounted.
If internal class flags think the medium is mounted but in reality it is not (e.g. chip card was removed from drive), then the internal class flags will be reset accordingly. Hence this method is not
Implemented in HBCI::MediumRDHBase. |
|
Returns the id of the medium. For DDV this is the CID of the chip card, for RDH this is the system ID assigned to us by an institute.
Implemented in HBCI::MediumRDHBase. |
|
Returns the id of the medium. For DDV this is the card number. For RDH this is the name of the file. This is used when saving HBCIUser data to refer to the medium used. Implemented in HBCI::MediumRDHBase. |
|
Returns the type this medium is of.
Implemented in HBCI::MediumRDHBase. |
|
Returns the type name. This is needed to find the responsible MediumPlugin.
|
|
Mounts a medium and makes its crypto methods available. When reimplementing this you should have a counter to allow nested mounting and unmounting.
Implemented in HBCI::MediumRDHBase. |
|
Returns a unique sequence number. This method MUST never return a sequence number it returned before! Therefore the medium will probably save the current sequence number before returning a new one. (Depends on the actual implementation class, of course.)
Implemented in HBCI::MediumRDHBase. |
|
|
|
|
|
Returns the security mode of this medium. E.g. HBCI_SECURITY_DDV or HBCI_SECURITY_RDH.
Implemented in HBCI::MediumRDHBase. |
|
Since some media (like hbci chip cards) are able to store multiple account entries you have to select one.
Implemented in HBCI::MediumRDHBase. |
|
|
|
Set the given property to the given value. The following error code can be expected:
|
|
Sign data
Implemented in HBCI::MediumRDHBase. |
|
Returns the number of the sign key. RDH-media return the number of the users private sign key.
Implemented in HBCI::MediumRDHBase. |
|
Returns the version of the crypt key. RDH-media return the version of the users private sign key.
Implemented in HBCI::MediumRDHBase. |
|
Unmounts a medium so that it may be removed. See mountMedium() about nested mounts.
Implemented in HBCI::MediumRDHBase. |
|
Verify the signature of given data
Implemented in HBCI::MediumRDHBase. |
|
|
|
|
|
|