eID middleware

be::portugal::eid::PTEID_SmartCard Class Reference

Abstract base class for Smart card. More...

Inheritance diagram for be::portugal::eid::PTEID_SmartCard:

be::portugal::eid::PTEID_Card be::portugal::eid::PTEID_Object IDisposable be::portugal::eid::PTEID_EIDCard be::portugal::eid::PTEID_ForeignerCard be::portugal::eid::PTEID_KidsCard

List of all members.

Public Member Functions

override void Dispose ()
void selectApplication (PTEID_ByteArray applicationId)
 Select an application from the card.
virtual PTEID_ByteArray sendAPDU (PTEID_ByteArray cmd, PTEID_Pin pin, string csPinCode)
 Send an APDU command to the card and get the result.
virtual PTEID_ByteArray sendAPDU (PTEID_ByteArray cmd, PTEID_Pin pin)
 Send an APDU command to the card and get the result.
override PTEID_ByteArray sendAPDU (PTEID_ByteArray cmd)
 Send an APDU command to the card and get the result.
virtual int readFile (string fileID, PTEID_ByteArray arg1, PTEID_Pin pin, string csPinCode)
 Read a File from the card.
virtual int readFile (string fileID, PTEID_ByteArray arg1, PTEID_Pin pin)
 Read a File from the card.
virtual int readFile (string fileID, PTEID_ByteArray arg1)
 Read a File from the card.
virtual bool writeFile (string fileID, PTEID_ByteArray arg1, PTEID_Pin pin, string csPinCode)
 Write a file to the card.
virtual bool writeFile (string fileID, PTEID_ByteArray arg1, PTEID_Pin pin)
 Write a file to the card.
override bool writeFile (string fileID, PTEID_ByteArray arg1)
 Write a file to the card.
virtual uint pinCount ()
 Return the number of pin on the card.
virtual PTEID_Pins getPins ()
 Return an object to access all the pins on the card.
virtual uint certificateCount ()
 Return the number of certificate on the card.
virtual PTEID_Certificates getCertificates ()
 Return an object to access all the certificates on the card.
virtual PTEID_ByteArray getChallenge (bool bForceNewInit)
 Return the challenge.
virtual PTEID_ByteArray getChallenge ()
 Return the challenge.
virtual PTEID_ByteArray getChallengeResponse ()
 Return the response to the challenge.
virtual bool verifyChallengeResponse (PTEID_ByteArray challenge, PTEID_ByteArray response)
 Return true if the response of the card to the given challenge is the same as the response expected.


Detailed Description

Abstract base class for Smart card.


Member Function Documentation

virtual uint be::portugal::eid::PTEID_SmartCard::certificateCount (  )  [inline, virtual]

Return the number of certificate on the card.

override void be::portugal::eid::PTEID_SmartCard::Dispose (  )  [inline, virtual]

virtual PTEID_Certificates be::portugal::eid::PTEID_SmartCard::getCertificates (  )  [inline, virtual]

Return an object to access all the certificates on the card.

virtual PTEID_ByteArray be::portugal::eid::PTEID_SmartCard::getChallenge (  )  [inline, virtual]

Return the challenge.

virtual PTEID_ByteArray be::portugal::eid::PTEID_SmartCard::getChallenge ( bool  bForceNewInit  )  [inline, virtual]

Return the challenge.

Parameters:
bForceNewInit force a new initialization of the couple challenge/response

virtual PTEID_ByteArray be::portugal::eid::PTEID_SmartCard::getChallengeResponse (  )  [inline, virtual]

Return the response to the challenge.

virtual PTEID_Pins be::portugal::eid::PTEID_SmartCard::getPins (  )  [inline, virtual]

Return an object to access all the pins on the card.

virtual uint be::portugal::eid::PTEID_SmartCard::pinCount (  )  [inline, virtual]

Return the number of pin on the card.

virtual int be::portugal::eid::PTEID_SmartCard::readFile ( string  fileID,
PTEID_ByteArray  arg1 
) [inline, virtual]

Read a File from the card.

If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

Parameters:
fileID is the path of the file
arg1 return the file

virtual int be::portugal::eid::PTEID_SmartCard::readFile ( string  fileID,
PTEID_ByteArray  arg1,
PTEID_Pin  pin 
) [inline, virtual]

Read a File from the card.

If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

Parameters:
fileID is the path of the file
arg1 return the file
pin is the pin to ask for reading

virtual int be::portugal::eid::PTEID_SmartCard::readFile ( string  fileID,
PTEID_ByteArray  arg1,
PTEID_Pin  pin,
string  csPinCode 
) [inline, virtual]

Read a File from the card.

If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

Parameters:
fileID is the path of the file
arg1 return the file
pin is the pin to ask for reading
csPinCode is the code of the pin (it will be asked if needed and not set)

void be::portugal::eid::PTEID_SmartCard::selectApplication ( PTEID_ByteArray  applicationId  )  [inline]

Select an application from the card.

override PTEID_ByteArray be::portugal::eid::PTEID_SmartCard::sendAPDU ( PTEID_ByteArray  cmd  )  [inline, virtual]

Send an APDU command to the card and get the result.

Parameters:
cmd is the apdu command
Returns:
a PTEID_ByteArray containing the result

Reimplemented from be::portugal::eid::PTEID_Card.

virtual PTEID_ByteArray be::portugal::eid::PTEID_SmartCard::sendAPDU ( PTEID_ByteArray  cmd,
PTEID_Pin  pin 
) [inline, virtual]

Send an APDU command to the card and get the result.

Parameters:
cmd is the apdu command
pin is the pin to ask for writing
Returns:
a PTEID_ByteArray containing the result

virtual PTEID_ByteArray be::portugal::eid::PTEID_SmartCard::sendAPDU ( PTEID_ByteArray  cmd,
PTEID_Pin  pin,
string  csPinCode 
) [inline, virtual]

Send an APDU command to the card and get the result.

Parameters:
cmd is the apdu command
pin is the pin to ask for writing
csPinCode is the code of the pin (it will be asked if needed and not set)
Returns:
a PTEID_ByteArray containing the result

virtual bool be::portugal::eid::PTEID_SmartCard::verifyChallengeResponse ( PTEID_ByteArray  challenge,
PTEID_ByteArray  response 
) [inline, virtual]

Return true if the response of the card to the given challenge is the same as the response expected.

For virtual card (from file), always return false.

Parameters:
challenge is the challenge to check
response is the response expected from the card

override bool be::portugal::eid::PTEID_SmartCard::writeFile ( string  fileID,
PTEID_ByteArray  arg1 
) [inline, virtual]

Write a file to the card.

Throw PTEID_ExCmdNotAllowed exception you're not allowed to write the file. If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

Parameters:
fileID is the path of the file
arg1 contents the bytes to write

Reimplemented from be::portugal::eid::PTEID_Card.

virtual bool be::portugal::eid::PTEID_SmartCard::writeFile ( string  fileID,
PTEID_ByteArray  arg1,
PTEID_Pin  pin 
) [inline, virtual]

Write a file to the card.

Throw PTEID_ExCmdNotAllowed exception you're not allowed to write the file. If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

Parameters:
fileID is the path of the file
arg1 contents the bytes to write
pin pin is the pin to ask for writing

virtual bool be::portugal::eid::PTEID_SmartCard::writeFile ( string  fileID,
PTEID_ByteArray  arg1,
PTEID_Pin  pin,
string  csPinCode 
) [inline, virtual]

Write a file to the card.

Throw PTEID_ExCmdNotAllowed exception you're not allowed to write the file. If no pin is passed and a pin is needed by the card, the pin code will be asked anyway.

Parameters:
fileID is the path of the file
arg1 contents the bytes to write
pin pin is the pin to ask for writing
csPinCode is the code of the pin (it will be asked if needed and not set)