LibLogicalAccess  2.5.0
An Open Source RFID Library
Loading...
Searching...
No Matches
Public Member Functions | List of all members
logicalaccess::TwicISO7816Commands Class Reference

The Twic ISO7816 commands base class. More...

#include <twiciso7816commands.hpp>

Inheritance diagram for logicalaccess::TwicISO7816Commands:
logicalaccess::ISO7816ISO7816Commands logicalaccess::TwicCommands logicalaccess::ISO7816Commands logicalaccess::Commands logicalaccess::ICommands

Public Member Functions

 TwicISO7816Commands ()
 Constructor.
 
 TwicISO7816Commands (std::string ct)
 
virtual ~TwicISO7816Commands ()
 Destructor.
 
void selectTWICApplication () override
 Select the TWIC application.
 
ByteVector getUnsignedCardholderUniqueIdentifier () override
 Get the Unsigned Cardholder Unique Identifier.
 
ByteVector getTWICPrivacyKey () override
 Get the TWIC Privacy Key.
 
ByteVector getCardholderUniqueIdentifier () override
 Get the Cardholder Unique Identifier.
 
ByteVector getCardHolderFingerprints () override
 Get the Cardholder Fingerprints.
 
ByteVector getSecurityObject () override
 Get the Security Object.
 
std::shared_ptr< ISO7816CommandsgetISO7816Commands () const override
 
- Public Member Functions inherited from logicalaccess::ISO7816ISO7816Commands
 ISO7816ISO7816Commands ()
 Constructor.
 
 ISO7816ISO7816Commands (std::string)
 
virtual ~ISO7816ISO7816Commands ()
 Destructor.
 
ByteVector readBinary (size_t length, size_t offset, unsigned short efid=0) override
 Read binary data.
 
void writeBinary (const ByteVector &data, size_t offset, unsigned short efid=0) override
 Write binary data.
 
void updateBinary (const ByteVector &data, size_t offset, unsigned short efid=0) override
 Update binary data.
 
void eraseBinary (size_t offset, unsigned short efid=0) override
 Erase binary data.
 
ByteVector getData (unsigned short dataObject, size_t length) override
 Get data.
 
ByteVector getDataList (const ByteVector &data, size_t length, unsigned short efid=ISO7816_DATA_OBJECT_SELECTED) override
 Get data.
 
void putData (const ByteVector &data, unsigned short dataObject) override
 Put data.
 
ByteVector getResponse (unsigned char maxlength=0) override
 Get response.
 
void selectFile (unsigned char p1, unsigned char p2, const ByteVector &data) override
 Select a file.
 
ByteVector readRecords (unsigned short fid=0, unsigned char start_record=0, ISORecords record_number=ISO_RECORD_ONERECORD) override
 Read records.
 
void appendrecord (const ByteVector &data=ByteVector(), unsigned short fid=0) override
 Append a record to a file.
 
ByteVector getChallenge (unsigned int length=8) override
 Get the ISO challenge for authentication.
 
void externalAuthenticate (unsigned char algorithm=0x00, bool globalReference=false, unsigned char keyno=0x00, const ByteVector &data=ByteVector()) override
 ISO external authenticate.
 
ByteVector externalAuthenticate (unsigned char algorithm, bool globalReference, unsigned char keyno, const ByteVector &data, unsigned char le) override
 ISO external authenticate.
 
ByteVector internalAuthenticate (unsigned char algorithm=0x00, bool globalReference=false, unsigned char keyno=0x00, const ByteVector &RPCD2=ByteVector(), unsigned int length=16) override
 ISO internal authenticate.
 
ByteVector generalAuthenticate (unsigned char algorithm, bool globalReference, unsigned char keyno, const ByteVector &dataField, unsigned char le) override
 ISO general authenticate.
 
ByteVector generalAuthenticate_challenge (unsigned char algorithm, bool globalReference, unsigned char keyno) override
 
ByteVector generalAuthenticate_response (unsigned char algorithm, bool globalReference, unsigned char keyno, const ByteVector &data) override
 
void removeApplication (const ByteVector &data, ISORemoveApplicationP1 p1=P1_STATE_OPERATIONAL_OR_INITIALIZATION_TO_CREATION) override
 
ByteVector applicationManagementRequest (const ByteVector &data, ISOApplicationManagementRequestP1 p1=P1_STATE_CREATION_TO_OPERATIONAL, unsigned char p2=0x00) override
 
std::shared_ptr< ISO7816ReaderCardAdaptergetISO7816ReaderCardAdapter () const
 Get the ISO7816 reader/card adapter.
 
- Public Member Functions inherited from logicalaccess::ISO7816Commands
 ISO7816Commands ()
 
 ISO7816Commands (std::string ct)
 
virtual ~ISO7816Commands ()
 
virtual ByteVector readBinary (size_t length, size_t offset, unsigned short efid=0)=0
 Read binary data.
 
virtual void writeBinary (const ByteVector &data, size_t offset, unsigned short efid=0)=0
 Write binary data.
 
virtual void updateBinary (const ByteVector &data, size_t offset, unsigned short efid=0)=0
 Update binary data.
 
virtual void eraseBinary (size_t offset, unsigned short efid=0)=0
 Erase binary data.
 
virtual ByteVector getData (unsigned short dataObject, size_t length=0)=0
 Get data.
 
virtual ByteVector getDataList (int64_t dataObject, unsigned short efid=ISO7816_DATA_OBJECT_SELECTED, unsigned char listtag=ISO7816_DATA_OBJECT_HEADERLIST, size_t length=0)
 Get data.
 
virtual ByteVector getDataList (TLVPtr tlv, size_t length=0, unsigned short efid=ISO7816_DATA_OBJECT_SELECTED)
 Get data.
 
virtual ByteVector getDataList (const ByteVector &data, size_t length=0, unsigned short efid=ISO7816_DATA_OBJECT_SELECTED)=0
 Get data.
 
virtual void putData (const ByteVector &data, unsigned short dataObject)=0
 Put data.
 
virtual ByteVector getResponse (unsigned char maxlength=0)=0
 Get response.
 
virtual void selectFile (ISOSelectFileP1 p1, ISOSelectFileP2 p2, unsigned short efid)
 Select a file under current DF by the file identifier.
 
virtual void selectFile (unsigned short efid)
 Select a file under current DF by the file identifier.
 
virtual void selectFile (const ByteVector &dfname)
 Select a file by the DF name.
 
virtual void selectFile (unsigned char p1, unsigned char p2, const ByteVector &data)=0
 Select a file.
 
virtual ByteVector readRecords (unsigned short fid=0, unsigned char start_record=0, ISORecords record_number=ISO_RECORD_ONERECORD)=0
 Read records.
 
virtual void appendrecord (const ByteVector &data=ByteVector(), unsigned short fid=0)=0
 Append a record to a file.
 
virtual ByteVector getChallenge (unsigned int length=8)=0
 Get the ISO challenge for authentication.
 
virtual void externalAuthenticate (unsigned char algorithm=0x00, bool globalReference=false, unsigned char keyno=0x00, const ByteVector &data=ByteVector())=0
 ISO external authenticate.
 
virtual ByteVector externalAuthenticate (unsigned char algorithm, bool globalReference, unsigned char keyno, const ByteVector &data, unsigned char le)=0
 ISO external authenticate.
 
virtual ByteVector internalAuthenticate (unsigned char algorithm=0x00, bool globalReference=false, unsigned char keyno=0x00, const ByteVector &RPCD2=ByteVector(), unsigned int length=16)=0
 ISO internal authenticate.
 
virtual ByteVector generalAuthenticate (unsigned char algorithm, bool globalReference, unsigned char keyno, const ByteVector &dataField, unsigned char le)=0
 ISO general authenticate.
 
virtual ByteVector generalAuthenticate_challenge (unsigned char algorithm, bool globalReference, unsigned char keyno)=0
 
virtual ByteVector generalAuthenticate_response (unsigned char algorithm, bool globalReference, unsigned char keyno, const ByteVector &data)=0
 
virtual void removeApplication (const ByteVector &data, ISORemoveApplicationP1 p1=P1_STATE_OPERATIONAL_OR_INITIALIZATION_TO_CREATION)=0
 
virtual void removeApplication (TLVPtr tlv, ISORemoveApplicationP1 p1=P1_STATE_OPERATIONAL_OR_INITIALIZATION_TO_CREATION)
 
virtual ByteVector applicationManagementRequest (const ByteVector &data, ISOApplicationManagementRequestP1 p1=P1_STATE_CREATION_TO_OPERATIONAL, unsigned char p2=0x00)=0
 
virtual ByteVector applicationManagementRequest (TLVPtr tlv, ISOApplicationManagementRequestP1 p1=P1_STATE_CREATION_TO_OPERATIONAL, unsigned char p2=0x00)
 
- Public Member Functions inherited from logicalaccess::Commands
 Commands ()=delete
 Constructor.
 
virtual ~Commands ()
 
std::shared_ptr< ChipgetChip () const override
 Get the chip.
 
virtual void setChip (std::shared_ptr< Chip > chip)
 Set the chip.
 
std::shared_ptr< ReaderCardAdaptergetReaderCardAdapter () const override
 Get the reader/card adapter.
 
virtual void setReaderCardAdapter (std::shared_ptr< ReaderCardAdapter > adapter)
 Set the reader/card adapter.
 
virtual const std::string & getCmdType () const
 Get the cmd name.
 
virtual void setCmdType (const std::string &command_type)
 Set the cmd name.
 
- Public Member Functions inherited from logicalaccess::ICommands
virtual ~ICommands ()=default
 
virtual std::shared_ptr< ChipgetChip () const =0
 Get the chip.
 
virtual std::shared_ptr< ReaderCardAdaptergetReaderCardAdapter () const =0
 Get the reader/card adapter.
 
- Public Member Functions inherited from logicalaccess::TwicCommands
virtual ~TwicCommands ()=default
 
size_t getDataObjectLength (int64_t dataObject, bool withObjectLength=false)
 Get the current length for a data object.
 
virtual void selectTWICApplication ()=0
 Select the TWIC application.
 
virtual ByteVector getUnsignedCardholderUniqueIdentifier ()=0
 Get the Unsigned Cardholder Unique Identifier.
 
virtual ByteVector getTWICPrivacyKey ()=0
 Get the TWIC Privacy Key.
 
virtual ByteVector getCardholderUniqueIdentifier ()=0
 Get the Cardholder Unique Identifier.
 
virtual ByteVector getCardHolderFingerprints ()=0
 Get the Cardholder Fingerprints.
 
virtual ByteVector getSecurityObject ()=0
 Get the Security Object.
 
virtual std::shared_ptr< ISO7816CommandsgetISO7816Commands () const
 

Additional Inherited Members

- Static Public Member Functions inherited from logicalaccess::TwicCommands
static size_t getMinimumBytesRepresentation (size_t value)
 
static size_t getMaximumDataObjectLength (int64_t dataObject)
 
static size_t getMaximumTagLength (int64_t dataObject, unsigned char tag)
 
static size_t getValueFromBytes (unsigned char *data, size_t datalength)
 
static bool getTagData (std::shared_ptr< TwicLocation > location, void *data, size_t datalen, void *datatag, size_t &datataglen)
 
- Protected Member Functions inherited from logicalaccess::Commands
 Commands (std::string commandtype)
 Constructor.
 
- Static Protected Member Functions inherited from logicalaccess::ISO7816ISO7816Commands
static void setP1P2 (size_t offset, unsigned short efid, unsigned char &p1, unsigned char &p2)
 Set P1 and P2 parameters.
 
- Protected Attributes inherited from logicalaccess::Commands
std::shared_ptr< ReaderCardAdapterd_readerCardAdapter
 The reader/card adapter.
 
std::weak_ptr< Chipd_chip
 The chip.
 
std::string d_commandtype
 The command type.
 

Detailed Description

The Twic ISO7816 commands base class.

Constructor & Destructor Documentation

◆ TwicISO7816Commands() [1/2]

logicalaccess::TwicISO7816Commands::TwicISO7816Commands ( )

Constructor.

◆ TwicISO7816Commands() [2/2]

logicalaccess::TwicISO7816Commands::TwicISO7816Commands ( std::string  ct)
explicit

◆ ~TwicISO7816Commands()

logicalaccess::TwicISO7816Commands::~TwicISO7816Commands ( )
virtual

Destructor.

Member Function Documentation

◆ getCardHolderFingerprints()

ByteVector logicalaccess::TwicISO7816Commands::getCardHolderFingerprints ( )
overridevirtual

Get the Cardholder Fingerprints.

Returns
the data.

Implements logicalaccess::TwicCommands.

◆ getCardholderUniqueIdentifier()

ByteVector logicalaccess::TwicISO7816Commands::getCardholderUniqueIdentifier ( )
overridevirtual

Get the Cardholder Unique Identifier.

Returns
the data.

Implements logicalaccess::TwicCommands.

◆ getISO7816Commands()

std::shared_ptr< ISO7816Commands > logicalaccess::TwicISO7816Commands::getISO7816Commands ( ) const
inlineoverridevirtual

Reimplemented from logicalaccess::TwicCommands.

◆ getSecurityObject()

ByteVector logicalaccess::TwicISO7816Commands::getSecurityObject ( )
overridevirtual

Get the Security Object.

Returns
the data.

Implements logicalaccess::TwicCommands.

◆ getTWICPrivacyKey()

ByteVector logicalaccess::TwicISO7816Commands::getTWICPrivacyKey ( )
overridevirtual

Get the TWIC Privacy Key.

Returns
the data.
Remarks
Only accessible with the contact chip.

Implements logicalaccess::TwicCommands.

◆ getUnsignedCardholderUniqueIdentifier()

ByteVector logicalaccess::TwicISO7816Commands::getUnsignedCardholderUniqueIdentifier ( )
overridevirtual

Get the Unsigned Cardholder Unique Identifier.

Returns
the data.

Implements logicalaccess::TwicCommands.

◆ selectTWICApplication()

void logicalaccess::TwicISO7816Commands::selectTWICApplication ( )
overridevirtual

Select the TWIC application.

Implements logicalaccess::TwicCommands.


The documentation for this class was generated from the following files: