|
| DESFireISO7816Commands () |
| Constructor.
|
|
| DESFireISO7816Commands (std::string) |
|
virtual | ~DESFireISO7816Commands () |
| Destructor.
|
|
void | setChip (std::shared_ptr< Chip > chip) override |
|
void | erase () override |
| Erase the card.
|
|
void | selectApplication (unsigned int aid) override |
| Select an application.
|
|
void | createApplication (unsigned int aid, DESFireKeySettings settings, unsigned char maxNbKeys) override |
| Create a new application.
|
|
void | deleteApplication (unsigned int aid) override |
| Delete an application.
|
|
std::vector< unsigned int > | getApplicationIDs () override |
| Get the current application list.
|
|
void | changeKey (unsigned char keyno, std::shared_ptr< DESFireKey > key) override |
| Change a key in the current application.
|
|
void | getKeySettings (DESFireKeySettings &settings, unsigned char &maxNbKeys) override |
| Get key settings on the current application.
|
|
virtual uint8_t | getKeyVersion (uint8_t keyno) |
| Get a key version of a key.
|
|
void | changeKeySettings (DESFireKeySettings settings) override |
| Change key settings for the current application.
|
|
ByteVector | getFileIDs () override |
| Get the File IDentifiers of all active files within the currently selected application.
|
|
FileSetting | getFileSettings (unsigned char fileno) override |
| Get settings of a specific file in the current application.
|
|
void | changeFileSettings (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, bool plain) override |
| Change file settings of a specific file in the current application.
|
|
void | createStdDataFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, unsigned int fileSize) override |
| Create a new data file in the current application.
|
|
void | createBackupFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, unsigned int fileSize) override |
| Create a new backup file in the current application.
|
|
void | createValueFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, int32_t lowerLimit, int32_t upperLimit, int32_t value, bool limitedCreditEnabled) override |
| Create a new value file in the current application.
|
|
void | createLinearRecordFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, unsigned int fileSize, unsigned int maxNumberOfRecords) override |
| Create a new linear record file in the current application.
|
|
void | createCyclicRecordFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, unsigned int fileSize, unsigned int maxNumberOfRecords) override |
| Create a new cyclic record file in the current application.
|
|
void | deleteFile (unsigned char fileno) override |
| Delete a file in the current application.
|
|
ByteVector | readData (unsigned char fileno, unsigned int offset, unsigned int length, EncryptionMode mode) override |
| Read data from a specific file.
|
|
void | writeData (unsigned char fileno, unsigned int offset, const ByteVector &data, EncryptionMode mode) override |
| Write data into a specific file.
|
|
int32_t | getValue (unsigned char fileno, EncryptionMode mode) override |
| Get value from a specific value file.
|
|
void | credit (unsigned char fileno, unsigned int value, EncryptionMode mode) override |
| Credit a specific value file.
|
|
void | debit (unsigned char fileno, unsigned int value, EncryptionMode mode) override |
| Debit a specific value file.
|
|
void | limitedCredit (unsigned char fileno, int32_t value, EncryptionMode mode) override |
| Limit credit on a specific value file.
|
|
void | writeRecord (unsigned char fileno, unsigned int offset, const ByteVector &data, EncryptionMode mode) override |
| Write record into a specific record file.
|
|
ByteVector | readRecords (unsigned char fileno, unsigned int offset, unsigned int length, EncryptionMode mode) override |
| Read record from a specific record file.
|
|
void | clearRecordFile (unsigned char fileno) override |
| Clear a specific record file.
|
|
void | commitTransaction () override |
| Commit the transaction.
|
|
void | abortTransaction () override |
| Abort the transaction.
|
|
void | authenticate (unsigned char keyno=0) override |
| Authenticate, given a key number.
|
|
void | authenticate (unsigned char keyno, std::shared_ptr< DESFireKey > key) override |
| Authenticate, given a key number.
|
|
DESFireCardVersion | getVersion () override |
| Get the card version information.
|
|
std::shared_ptr< ISO7816ReaderCardAdapter > | getISO7816ReaderCardAdapter () const |
| Get the ISO7816 reader/card adapter.
|
|
void | setSAMChip (std::shared_ptr< SAMChip > t) |
| Set the SAM Chip.
|
|
std::shared_ptr< SAMChip > | getSAMChip () const |
| get the SAM Chip.
|
|
void | getKeyFromSAM (std::shared_ptr< DESFireKey > key, ByteVector diversify) const |
| retrieve key from SAM AV2 dump key.
|
|
ByteVector | sam_authenticate_p1 (std::shared_ptr< DESFireKey > key, ByteVector rndb, ByteVector diversify) const |
|
void | sam_authenticate_p2 (unsigned char keyno, ByteVector rndap) const |
|
Public Member Functions inherited from logicalaccess::DESFireCommands |
| DESFireCommands () |
| Constructor.
|
|
| DESFireCommands (std::string cmdtype) |
| Constructor.
|
|
virtual | ~DESFireCommands () |
|
virtual void | erase ()=0 |
| Erase the card.
|
|
virtual void | selectApplication (std::shared_ptr< DESFireLocation > location) |
| Select an application.
|
|
virtual void | createApplication (std::shared_ptr< DESFireLocation > location, DESFireKeySettings settings, unsigned char maxNbKeys) |
| Create a new application.
|
|
virtual void | createStdDataFile (std::shared_ptr< DESFireLocation > location, const DESFireAccessRights &accessRights, unsigned int fileSize) |
| Create a new data file in the current application.
|
|
virtual EncryptionMode | getEncryptionMode (unsigned char fileno, bool isReadMode, bool *needLoadKey=nullptr) |
| Get the communication mode for a file.
|
|
virtual EncryptionMode | getEncryptionMode (const FileSetting &fileSetting, bool isReadMode, bool *needLoadKey=nullptr) |
|
virtual unsigned int | getFileLength (unsigned char fileno) |
| Get the length of a file.
|
|
virtual void | selectApplication (unsigned int aid)=0 |
| Select an application.
|
|
virtual void | createApplication (unsigned int aid, DESFireKeySettings settings, unsigned char maxNbKeys)=0 |
| Create a new application.
|
|
virtual void | deleteApplication (unsigned int aid)=0 |
| Delete an application.
|
|
virtual std::vector< unsigned int > | getApplicationIDs ()=0 |
| Get the current application list.
|
|
virtual void | changeKey (unsigned char keyno, std::shared_ptr< DESFireKey > key)=0 |
| Change a key in the current application.
|
|
virtual void | getKeySettings (DESFireKeySettings &settings, unsigned char &maxNbKeys)=0 |
| Get key settings on the current application.
|
|
virtual void | changeKeySettings (DESFireKeySettings settings)=0 |
| Change key settings for the current application.
|
|
virtual ByteVector | getFileIDs ()=0 |
| Get the File IDentifiers of all active files within the currently selected application.
|
|
virtual FileSetting | getFileSettings (unsigned char fileno)=0 |
| Get settings of a specific file in the current application.
|
|
virtual void | changeFileSettings (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, bool plain)=0 |
| Change file settings of a specific file in the current application.
|
|
virtual void | createStdDataFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, unsigned int fileSize)=0 |
| Create a new data file in the current application.
|
|
virtual void | createBackupFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, unsigned int fileSize)=0 |
| Create a new backup file in the current application.
|
|
virtual void | createValueFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, int32_t lowerLimit, int32_t upperLimit, int32_t value, bool limitedCreditEnabled)=0 |
| Create a new value file in the current application.
|
|
virtual void | createLinearRecordFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, unsigned int fileSize, unsigned int maxNumberOfRecords)=0 |
| Create a new linear record file in the current application.
|
|
virtual void | createCyclicRecordFile (unsigned char fileno, EncryptionMode comSettings, const DESFireAccessRights &accessRights, unsigned int fileSize, unsigned int maxNumberOfRecords)=0 |
| Create a new cyclic record file in the current application.
|
|
virtual void | deleteFile (unsigned char fileno)=0 |
| Delete a file in the current application.
|
|
virtual ByteVector | readData (unsigned char fileno, unsigned int offset, unsigned int length, EncryptionMode mode)=0 |
| Read data from a specific file.
|
|
virtual void | writeData (unsigned char fileno, unsigned int offset, const ByteVector &data, EncryptionMode mode)=0 |
| Write data into a specific file.
|
|
virtual int32_t | getValue (unsigned char fileno, EncryptionMode mode)=0 |
| Get value from a specific value file.
|
|
virtual void | credit (unsigned char fileno, unsigned int value, EncryptionMode mode)=0 |
| Credit a specific value file.
|
|
virtual void | debit (unsigned char fileno, unsigned int value, EncryptionMode mode)=0 |
| Debit a specific value file.
|
|
virtual void | limitedCredit (unsigned char fileno, int32_t value, EncryptionMode mode)=0 |
| Limit credit on a specific value file.
|
|
virtual void | writeRecord (unsigned char fileno, unsigned int offset, const ByteVector &data, EncryptionMode mode)=0 |
| Write record into a specific record file.
|
|
virtual ByteVector | readRecords (unsigned char fileno, unsigned int offset, unsigned int length, EncryptionMode mode)=0 |
| Read record from a specific record file.
|
|
virtual void | clearRecordFile (unsigned char fileno)=0 |
| Clear a specific record file.
|
|
virtual void | commitTransaction ()=0 |
| Commit the transaction.
|
|
virtual void | abortTransaction ()=0 |
| Abort the transaction.
|
|
virtual void | authenticate (unsigned char keyno=0)=0 |
| Authenticate a block, given a key number.
|
|
virtual void | authenticate (unsigned char keyno, std::shared_ptr< DESFireKey > key)=0 |
| Authenticate a block, given a key number.
|
|
virtual DESFireCardVersion | getVersion ()=0 |
| Get the card version information.
|
|
virtual SignatureResult | IKS_getLastReadSignature () const |
|
Public Member Functions inherited from logicalaccess::Commands |
| Commands ()=delete |
| Constructor.
|
|
virtual | ~Commands () |
|
std::shared_ptr< Chip > | getChip () const override |
| Get the chip.
|
|
virtual void | setChip (std::shared_ptr< Chip > chip) |
| Set the chip.
|
|
std::shared_ptr< ReaderCardAdapter > | getReaderCardAdapter () 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< Chip > | getChip () const =0 |
| Get the chip.
|
|
virtual std::shared_ptr< ReaderCardAdapter > | getReaderCardAdapter () const =0 |
| Get the reader/card adapter.
|
|