FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto.cpp
Go to the documentation of this file.
00001 /*-------------------------------------------------------------------
00002 |                                                                               |
00003 |      FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto.cpp       |
00004 |                                                                               |
00005 ---------------------------------------------------------------------
00006 
00007 Copyright © 2009-2010   FEIG ELECTRONIC GmbH, All Rights Reserved.
00008                                                 Lange Strasse 4
00009                                                 D-35781 Weilburg
00010                                                 Federal Republic of Germany
00011                                                 phone    : +49 6471 31090
00012                                                 fax      : +49 6471 310999
00013                                                 e-mail   : obid-support@feig.de
00014                                                 Internet : http://www.feig.de
00015                                         
00016 Author                  :       Markus Hultsch
00017 Begin                   :       30.03.2009
00018 
00019 Version                 :       03.02.07 / 27.10.2010 / M. Hultsch
00020 
00021 Operation Systems       :       independent
00022 
00023 Function                        :       implementation class for OBID® classic-pro transponder ISO14443-4 MIFARE DESFire
00024                                                 with [0xC1] commands
00025 
00026 NOTE                            :       this class supports only selected mode in Host-Mode
00027 
00028 
00029 Trademarks:
00030 -----------
00031 OBID®, OBID i-scan® and OBID myAXXESS® are registered Trademarks of FEIG ELECTRONIC GmbH
00032 Other Trademarks: see FEDM.h
00033 */
00034 
00035 #if !defined(_FEDM_NO_TAG_HANDLER_ISO14443)
00036 
00037 #include "../../FEDM.h"
00038 #include "FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto.h"
00039 #include "FedmIscTagHandler_ISO14443_4_MIFARE_DESFire.h"
00040 
00041 
00042 #if _MSC_VER >= 1400
00043         #pragma warning(disable : 4996)
00044 #endif
00045 
00046 
00047 
00048 //####################################################################
00049 // class FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto
00050 // >> supports only ISO Host Commands <<
00051 //####################################################################
00052 
00053 FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto()
00054 {
00055 }
00056 
00057 FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::~FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto()
00058 {
00059 }
00060 
00061 unsigned char FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetErrorSource()
00062 {
00063         return m_pParent->m_pImpl_C1->m_ucErrorSource;
00064 }
00065 
00066 unsigned int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetErrorCode()
00067 {
00068         return m_pParent->m_pImpl_C1->m_uiErrorCode;
00069 }
00070 
00071 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::Authenticate(       unsigned int uiApplicationID,
00072                                                                                                                                                         unsigned char ucReaderKeyIndex,
00073                                                                                                                                                         unsigned char ucDESFireKeyNo )
00074 {
00075         return m_pParent->m_pImpl_C1->Authenticate(uiApplicationID, 
00076                                                                                         ucReaderKeyIndex, 
00077                                                                                         ucDESFireKeyNo );
00078 }
00079 
00080 
00081         //####################################################################
00082         // 5 security related commands
00083         
00084         // [0x54] : [0xC1] DESFire Commands
00085 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::ChangeKeySettings(
00086         unsigned int uiApplicationID,
00087         unsigned char ucReaderKeyIndex,
00088         unsigned char ucNewKeySettings )
00089 {
00090         return m_pParent->m_pImpl_C1->ChangeKeySettings(uiApplicationID, 
00091                                                                                                         ucReaderKeyIndex, 
00092                                                                                                         ucNewKeySettings );
00093 }
00094 
00095         // [0x45] : T=CL
00096 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetKeySettings(
00097         unsigned char* pucResponseData,
00098         unsigned int uiResponseBufferLength,
00099         unsigned int& uiResponseLength )
00100 {
00101         return m_pParent->m_pImpl_C1->GetKeySettings(   pucResponseData, 
00102                                                                                                 uiResponseBufferLength, 
00103                                                                                                 uiResponseLength );
00104 }
00105 
00106         // [0xC4] : [0xC1] DESFire Commands
00107 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::ChangeKey(
00108         unsigned int uiApplicationID,
00109         unsigned char ucReaderKeyIndex,
00110         unsigned char ucDESFireKeyNo,
00111         unsigned char ucKeyNoToBeChanged,
00112         unsigned char ucAESNewKeyVersion,
00113         string sOldKey,
00114         string sNewKey )
00115 {
00116         return m_pParent->m_pImpl_C1->ChangeKey(        uiApplicationID, 
00117                                                                                         ucReaderKeyIndex, 
00118                                                                                         ucDESFireKeyNo, 
00119                                                                                         ucKeyNoToBeChanged, 
00120                                                                                         ucAESNewKeyVersion, 
00121                                                                                         sOldKey,
00122                                                                                         sNewKey );
00123 }
00124 
00125         // [0x64] : T=CL
00126 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetKeyVersion(
00127         unsigned char ucDESFireKeyNo,
00128         unsigned char* pucResponseData,
00129         unsigned int uiResponseBufferLength,
00130         unsigned int& uiResponseLength )
00131 {
00132         return m_pParent->m_pImpl_C1->GetKeyVersion(    ucDESFireKeyNo,
00133                                                                                                 pucResponseData, 
00134                                                                                                 uiResponseBufferLength, 
00135                                                                                                 uiResponseLength );
00136 }
00137 
00138 
00139         //####################################################################
00140         // 10 PICC level commands
00141 
00142         // [0xCA] : T=CL
00143 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::CreateApplication(
00144         unsigned int uiApplicationID,
00145         unsigned char ucKeySetting1,
00146         unsigned char ucKeySetting2,
00147         unsigned int uiISOFileID,
00148         string sDFName,
00149         unsigned char* pucResponseData,
00150         unsigned int uiResponseBufferLength,
00151         unsigned int& uiResponseLength )
00152 {
00153         return m_pParent->m_pImpl_C1->CreateApplication(        uiApplicationID,
00154                                                                                                         ucKeySetting1,
00155                                                                                                         ucKeySetting2,
00156                                                                                                         uiISOFileID,
00157                                                                                                         sDFName,
00158                                                                                                         pucResponseData,
00159                                                                                                         uiResponseBufferLength,
00160                                                                                                         uiResponseLength );
00161 }
00162 
00163         // [0xDA] : T=CL
00164 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::DeleteApplication(
00165         unsigned int uiApplicationID,
00166         unsigned char* pucResponseData,
00167         unsigned int uiResponseBufferLength,
00168         unsigned int& uiResponseLength )
00169 {
00170         return m_pParent->m_pImpl_C1->DeleteApplication(        uiApplicationID,
00171                                                                                                         pucResponseData, 
00172                                                                                                         uiResponseBufferLength, 
00173                                                                                                         uiResponseLength );
00174 }
00175 
00176         // [0x6A] : T=CL
00177 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetApplicationIDs(
00178         unsigned char* pucResponseData,
00179         unsigned int uiResponseBufferLength,
00180         unsigned int& uiResponseLength )
00181 {
00182         return m_pParent->m_pImpl_C1->GetApplicationIDs(        pucResponseData, 
00183                                                                                                         uiResponseBufferLength, 
00184                                                                                                         uiResponseLength );
00185 }
00186 
00187         // [0x6E] : T=CL
00188 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::FreeMemory(
00189         unsigned char* pucResponseData,
00190         unsigned int uiResponseBufferLength,
00191         unsigned int& uiResponseLength )
00192 {
00193         return m_pParent->m_pImpl_C1->FreeMemory(       pucResponseData, 
00194                                                                                         uiResponseBufferLength, 
00195                                                                                         uiResponseLength );
00196 }
00197 
00198         // [0x6D] : T=CL
00199 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetDFNames(
00200         unsigned char* pucResponseData,
00201         unsigned int uiResponseBufferLength,
00202         unsigned int& uiResponseLength )
00203 {
00204         return m_pParent->m_pImpl_C1->GetDFNames(       pucResponseData, 
00205                                                                                         uiResponseBufferLength, 
00206                                                                                         uiResponseLength );
00207 }
00208 
00209         // [0x5A] : T=CL
00210 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::SelectApplication(
00211         unsigned int uiApplicationID,
00212         unsigned char* pucResponseData,
00213         unsigned int uiResponseBufferLength,
00214         unsigned int& uiResponseLength )
00215 {
00216         return m_pParent->m_pImpl_C1->SelectApplication(        uiApplicationID, 
00217                                                                                                         pucResponseData, 
00218                                                                                                         uiResponseBufferLength, 
00219                                                                                                         uiResponseLength );
00220 }
00221 
00222         // [0xFC] : T=CL
00223 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::FormatPICC(
00224         unsigned char* pucResponseData,
00225         unsigned int uiResponseBufferLength,
00226         unsigned int& uiResponseLength )
00227 {
00228         return m_pParent->m_pImpl_C1->FormatPICC(       pucResponseData, 
00229                                                                                         uiResponseBufferLength, 
00230                                                                                         uiResponseLength );
00231 }
00232 
00233         // [0x60] : T=CL
00234 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetVersion(
00235         unsigned char* pucResponseData,
00236         unsigned int uiResponseBufferLength,
00237         unsigned int& uiResponseLength )
00238 {
00239         return m_pParent->m_pImpl_C1->GetVersion(       pucResponseData, 
00240                                                                                         uiResponseBufferLength, 
00241                                                                                         uiResponseLength );
00242 }
00243 
00244         // [0x51] : T=CL
00245 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetCardUID(
00246         unsigned char* pucResponseData,
00247         unsigned int uiResponseBufferLength,
00248         unsigned int& uiResponseLength )
00249 {
00250         return m_pParent->m_pImpl_C1->GetCardUID(       pucResponseData,
00251                                                                                         uiResponseBufferLength,
00252                                                                                         uiResponseLength );
00253 }
00254 
00255         // [0x5C] : T=CL
00256 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::SetConfiguration(
00257         unsigned char* pucRequestData,
00258         unsigned int uiRequestLength,
00259         unsigned char* pucResponseData,
00260         unsigned int uiResponseBufferLength,
00261         unsigned int& uiResponseLength )
00262 {
00263         return m_pParent->m_pImpl_C1->SetConfiguration(pucRequestData,
00264                                                                                                 uiRequestLength, 
00265                                                                                                 pucResponseData, 
00266                                                                                                 uiResponseBufferLength,
00267                                                                                                 uiResponseLength );
00268 }
00269 
00270 
00271         //####################################################################
00272         // 10 application level commands
00273 
00274         // [0x5F] : [0xC1] DESFire Commands
00275 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::ChangeFileSettings(
00276         unsigned int uiApplicationID,
00277         unsigned char ucReaderKeyIndex,
00278         unsigned char ucDESFireKeyNo,
00279         unsigned char ucFileNo,
00280         unsigned char ucNewFileCommSettings,
00281         unsigned char ucNewFileReadWriteAccessRights,
00282         unsigned char ucNewFileChangeAccessRights,
00283         unsigned char ucNewFileReadAccessRights,
00284         unsigned char ucNewFileWriteAccessRights )
00285 {
00286         return m_pParent->m_pImpl_C1->ChangeFileSettings(       uiApplicationID, 
00287                                                                                                         ucReaderKeyIndex, 
00288                                                                                                         ucDESFireKeyNo, 
00289                                                                                                         ucFileNo,
00290                                                                                                         ucNewFileCommSettings,
00291                                                                                                         ucNewFileReadWriteAccessRights,
00292                                                                                                         ucNewFileChangeAccessRights,
00293                                                                                                         ucNewFileReadAccessRights,
00294                                                                                                         ucNewFileWriteAccessRights );
00295 }
00296 
00297         // [0x6F] : T=CL
00298 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetFileIDs(
00299         unsigned char* pucResponseData,
00300         unsigned int uiResponseBufferLength,
00301         unsigned int& uiResponseLength )
00302 {
00303         return m_pParent->m_pImpl_C1->GetFileIDs(       pucResponseData,
00304                                                                                         uiResponseBufferLength,
00305                                                                                         uiResponseLength );
00306 }
00307 
00308         // [0xF5] : T=CL
00309 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetFileSettings(
00310         unsigned char ucFileNo,
00311         unsigned char* pucResponseData,
00312         unsigned int uiResponseBufferLength,
00313         unsigned int& uiResponseLength )
00314 {
00315         return m_pParent->m_pImpl_C1->GetFileSettings(  ucFileNo,
00316                                                                                                 pucResponseData, 
00317                                                                                                 uiResponseBufferLength, 
00318                                                                                                 uiResponseLength );
00319 }
00320 
00321         // [0xCD] : T=CL
00322 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::CreateStdDataFile(
00323         unsigned char ucFileNo,
00324         bool bWithISOFileID,
00325         unsigned int uiISOFileID,
00326         unsigned char ucFileCommSettings,
00327         unsigned char ucFileReadWriteAccessRights,
00328         unsigned char ucFileChangeAccessRights,
00329         unsigned char ucFileReadAccessRights,
00330         unsigned char ucFileWriteAccessRights,
00331         unsigned int uiFileSize,
00332         unsigned char* pucResponseData,
00333         unsigned int uiResponseBufferLength,
00334         unsigned int& uiResponseLength )
00335 {
00336         return m_pParent->m_pImpl_C1->CreateStdDataFile(        ucFileNo,
00337                                                                                                         bWithISOFileID,
00338                                                                                                         uiISOFileID,
00339                                                                                                         ucFileCommSettings,
00340                                                                                                         ucFileReadWriteAccessRights,
00341                                                                                                         ucFileChangeAccessRights,
00342                                                                                                         ucFileReadAccessRights,
00343                                                                                                         ucFileWriteAccessRights,
00344                                                                                                         uiFileSize,
00345                                                                                                         pucResponseData,
00346                                                                                                         uiResponseBufferLength,
00347                                                                                                         uiResponseLength );
00348 }
00349 
00350         // [0xCB] : T=CL
00351 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::CreateBackupDataFile(
00352         unsigned char ucFileNo,
00353         bool bWithISOFileID,
00354         unsigned int uiISOFileID,
00355         unsigned char ucFileCommSettings,
00356         unsigned char ucFileReadWriteAccessRights,
00357         unsigned char ucFileChangeAccessRights,
00358         unsigned char ucFileReadAccessRights,
00359         unsigned char ucFileWriteAccessRights,
00360         unsigned int uiFileSize,
00361         unsigned char* pucResponseData,
00362         unsigned int uiResponseBufferLength,
00363         unsigned int& uiResponseLength )
00364 {
00365         return m_pParent->m_pImpl_C1->CreateBackupDataFile(ucFileNo,
00366                                                                                                         bWithISOFileID,
00367                                                                                                         uiISOFileID,
00368                                                                                                         ucFileCommSettings,
00369                                                                                                         ucFileReadWriteAccessRights,
00370                                                                                                         ucFileChangeAccessRights,
00371                                                                                                         ucFileReadAccessRights,
00372                                                                                                         ucFileWriteAccessRights,
00373                                                                                                         uiFileSize,
00374                                                                                                         pucResponseData,
00375                                                                                                         uiResponseBufferLength,
00376                                                                                                         uiResponseLength );
00377 }
00378 
00379         // [0xCC] : T=CL
00380 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::CreateValueFile(
00381         unsigned char ucFileNo,
00382         unsigned char ucFileCommSettings,
00383         unsigned char ucFileReadWriteAccessRights,
00384         unsigned char ucFileChangeAccessRights,
00385         unsigned char ucFileReadAccessRights,
00386         unsigned char ucFileWriteAccessRights,
00387         unsigned int uiLowerLimit,
00388         unsigned int uiUpperLimit,
00389         unsigned int uiValue,
00390         unsigned char ucLimitedCreditEnabled,
00391         unsigned char* pucResponseData,
00392         unsigned int uiResponseBufferLength,
00393         unsigned int& uiResponseLength )
00394 {
00395         return m_pParent->m_pImpl_C1->CreateValueFile(  ucFileNo,
00396                                                                                                 ucFileCommSettings,
00397                                                                                                 ucFileReadWriteAccessRights,
00398                                                                                                 ucFileChangeAccessRights,
00399                                                                                                 ucFileReadAccessRights,
00400                                                                                                 ucFileWriteAccessRights,
00401                                                                                                 uiLowerLimit,
00402                                                                                                 uiUpperLimit,
00403                                                                                                 uiValue,
00404                                                                                                 ucLimitedCreditEnabled,
00405                                                                                                 pucResponseData,
00406                                                                                                 uiResponseBufferLength,
00407                                                                                                 uiResponseLength );
00408 }
00409 
00410         // [0xC1] : T=CL
00411 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::CreateLinearRecordFile(
00412         unsigned char ucFileNo,
00413         bool bWithISOFileID,
00414         unsigned int uiISOFileID,
00415         unsigned char ucFileCommSettings,
00416         unsigned char ucFileReadWriteAccessRights,
00417         unsigned char ucFileChangeAccessRights,
00418         unsigned char ucFileReadAccessRights,
00419         unsigned char ucFileWriteAccessRights,
00420         unsigned int uiRecordSize,
00421         unsigned int uiMaxNoOfRecords,
00422         unsigned char* pucResponseData,
00423         unsigned int uiResponseBufferLength,
00424         unsigned int& uiResponseLength )
00425 {
00426         return m_pParent->m_pImpl_C1->CreateLinearRecordFile(   ucFileNo,
00427                                                                                                                 bWithISOFileID,
00428                                                                                                                 uiISOFileID,
00429                                                                                                                 ucFileCommSettings,
00430                                                                                                                 ucFileReadWriteAccessRights,
00431                                                                                                                 ucFileChangeAccessRights,
00432                                                                                                                 ucFileReadAccessRights,
00433                                                                                                                 ucFileWriteAccessRights,
00434                                                                                                                 uiRecordSize,
00435                                                                                                                 uiMaxNoOfRecords,
00436                                                                                                                 pucResponseData,
00437                                                                                                                 uiResponseBufferLength,
00438                                                                                                                 uiResponseLength );
00439 }
00440 
00441         // [0xC0] : T=CL
00442 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::CreateCyclicRecordFile(
00443         unsigned char ucFileNo,
00444         bool bWithISOFileID,
00445         unsigned int uiISOFileID,
00446         unsigned char ucFileCommSettings,
00447         unsigned char ucFileReadWriteAccessRights,
00448         unsigned char ucFileChangeAccessRights,
00449         unsigned char ucFileReadAccessRights,
00450         unsigned char ucFileWriteAccessRights,
00451         unsigned int uiRecordSize,
00452         unsigned int uiMaxNoOfRecords,
00453         unsigned char* pucResponseData,
00454         unsigned int uiResponseBufferLength,
00455         unsigned int& uiResponseLength )
00456 {
00457         return m_pParent->m_pImpl_C1->CreateCyclicRecordFile(   ucFileNo,
00458                                                                                                                 bWithISOFileID,
00459                                                                                                                 uiISOFileID,
00460                                                                                                                 ucFileCommSettings,
00461                                                                                                                 ucFileReadWriteAccessRights,
00462                                                                                                                 ucFileChangeAccessRights,
00463                                                                                                                 ucFileReadAccessRights,
00464                                                                                                                 ucFileWriteAccessRights,
00465                                                                                                                 uiRecordSize,
00466                                                                                                                 uiMaxNoOfRecords,
00467                                                                                                                 pucResponseData,
00468                                                                                                                 uiResponseBufferLength,
00469                                                                                                                 uiResponseLength );
00470 }
00471 
00472         // [0xDF] : T=CL
00473 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::DeleteFile(
00474         unsigned char ucFileNo,
00475         unsigned char* pucResponseData,
00476         unsigned int uiResponseBufferLength,
00477         unsigned int& uiResponseLength )
00478 {
00479         return m_pParent->m_pImpl_C1->DeleteFile(       ucFileNo, 
00480                                                                                         pucResponseData,
00481                                                                                         uiResponseBufferLength,
00482                                                                                         uiResponseLength );
00483 }
00484 
00485         // [0x61] : T=CL
00486 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetISOFileIDs(
00487         unsigned char* pucResponseData,
00488         unsigned int uiResponseBufferLength,
00489         unsigned int& uiResponseLength )
00490 {
00491         return m_pParent->m_pImpl_C1->GetISOFileIDs(    pucResponseData, 
00492                                                                                                 uiResponseBufferLength, 
00493                                                                                                 uiResponseLength );
00494 }
00495 
00496 
00497         //####################################################################
00498         // 11 data manipulation commands
00499         
00500         // [0xBD] : [0xC1] DESFire Commands
00501 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::ReadStandardData(
00502         unsigned int uiApplicationID,
00503         unsigned char ucReaderKeyIndex,
00504         unsigned char ucDESFireKeyNo,
00505         unsigned char ucFileNo,
00506         unsigned char ucFileCommSettings,
00507         unsigned int uiFileOffset,
00508         unsigned int uiFileLen,
00509         unsigned char* pucFileData )
00510 {
00511         return m_pParent->m_pImpl_C1->ReadStandardData(uiApplicationID,
00512                                                                                                 ucReaderKeyIndex,
00513                                                                                                 ucDESFireKeyNo,
00514                                                                                                 ucFileNo,
00515                                                                                                 ucFileCommSettings,
00516                                                                                                 uiFileOffset,
00517                                                                                                 uiFileLen,
00518                                                                                                 pucFileData );
00519 }
00520         
00521         // [0x3D] : [0xC1] DESFire Commands
00522 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::WriteStandardData(
00523         unsigned int uiApplicationID,
00524         unsigned char ucReaderKeyIndex,
00525         unsigned char ucDESFireKeyNo,
00526         unsigned char ucFileNo,
00527         unsigned char ucFileCommSettings,
00528         unsigned int uiFileOffset,
00529         unsigned int uiFileLen,
00530         unsigned char* pucFileData )
00531 {
00532         return m_pParent->m_pImpl_C1->WriteStandardData(        uiApplicationID,
00533                                                                                                         ucReaderKeyIndex,
00534                                                                                                         ucDESFireKeyNo,
00535                                                                                                         ucFileNo,
00536                                                                                                         ucFileCommSettings,
00537                                                                                                         uiFileOffset,
00538                                                                                                         uiFileLen,
00539                                                                                                         pucFileData );
00540 }
00541 
00542         // [0x6C] : [0xC1] DESFire Commands
00543 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::GetValue(
00544         unsigned int uiApplicationID,
00545         unsigned char ucReaderKeyIndex,
00546         unsigned char ucDESFireKeyNo,
00547         unsigned char ucFileNo,
00548         unsigned char ucFileCommSettings,
00549         unsigned int& uiValue )
00550 {
00551         return m_pParent->m_pImpl_C1->GetValue(uiApplicationID,
00552                                                                                 ucReaderKeyIndex,
00553                                                                                 ucDESFireKeyNo,
00554                                                                                 ucFileNo,
00555                                                                                 ucFileCommSettings,
00556                                                                                 uiValue );
00557 }
00558 
00559         // [0x0C] : [0xC1] DESFire Commands
00560 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::Credit(
00561         unsigned int uiApplicationID,
00562         unsigned char ucReaderKeyIndex,
00563         unsigned char ucDESFireKeyNo,
00564         unsigned char ucFileNo,
00565         unsigned char ucFileCommSettings,
00566         unsigned int uiCreditValue )
00567 {
00568         return m_pParent->m_pImpl_C1->Credit(   uiApplicationID,
00569                                                                                 ucReaderKeyIndex,
00570                                                                                 ucDESFireKeyNo,
00571                                                                                 ucFileNo,
00572                                                                                 ucFileCommSettings,
00573                                                                                 uiCreditValue );
00574 }
00575 
00576         // [0xDC] : [0xC1] DESFire Commands
00577 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::Debit(
00578         unsigned int uiApplicationID,
00579         unsigned char ucReaderKeyIndex,
00580         unsigned char ucDESFireKeyNo,
00581         unsigned char ucFileNo,
00582         unsigned char ucFileCommSettings,
00583         unsigned int uiDebitValue )
00584 {
00585         return m_pParent->m_pImpl_C1->Debit(    uiApplicationID,
00586                                                                                 ucReaderKeyIndex,
00587                                                                                 ucDESFireKeyNo,
00588                                                                                 ucFileNo,
00589                                                                                 ucFileCommSettings,
00590                                                                                 uiDebitValue );
00591 }
00592 
00593 
00594         // [0x1C] : [0xC1] DESFire Commands
00595 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::LimitedCredit(
00596         unsigned int uiApplicationID,
00597         unsigned char ucReaderKeyIndex,
00598         unsigned char ucDESFireKeyNo,
00599         unsigned char ucFileNo,
00600         unsigned char ucFileCommSettings,
00601         unsigned int uiCreditValue )
00602 {
00603         return m_pParent->m_pImpl_C1->LimitedCredit(    uiApplicationID,
00604                                                                                                 ucReaderKeyIndex,
00605                                                                                                 ucDESFireKeyNo,
00606                                                                                                 ucFileNo,
00607                                                                                                 ucFileCommSettings,
00608                                                                                                 uiCreditValue );
00609 }
00610 
00611         // [0x3B] : [0xC1] DESFire Commands
00612 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::WriteRecord(
00613         unsigned int uiApplicationID,
00614         unsigned char ucReaderKeyIndex,
00615         unsigned char ucDESFireKeyNo,
00616         unsigned char ucFileNo,
00617         unsigned char ucFileCommSettings,
00618         unsigned int uiFileOffset,
00619         unsigned int uiRecordLen,
00620         unsigned char* pucRecordData )
00621 {
00622         return m_pParent->m_pImpl_C1->WriteRecord(      uiApplicationID,
00623                                                                                         ucReaderKeyIndex,
00624                                                                                         ucDESFireKeyNo,
00625                                                                                         ucFileNo,
00626                                                                                         ucFileCommSettings,
00627                                                                                         uiFileOffset,
00628                                                                                         uiRecordLen,
00629                                                                                         pucRecordData );
00630 }
00631 
00632         // [0xBB] : [0xC1] DESFire Commands
00633 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::ReadRecords(
00634         unsigned int uiApplicationID,
00635         unsigned char ucReaderKeyIndex,
00636         unsigned char ucDESFireKeyNo,
00637         unsigned char ucFileNo,
00638         unsigned char ucFileCommSettings,
00639         unsigned int uiRecordOffset,
00640         unsigned int uiNoOfRecords,
00641         unsigned int uiRecordSize,
00642         unsigned char* pucRecordData )
00643 {
00644         return m_pParent->m_pImpl_C1->ReadRecords(      uiApplicationID,
00645                                                                                         ucReaderKeyIndex,
00646                                                                                         ucDESFireKeyNo,
00647                                                                                         ucFileNo,
00648                                                                                         ucFileCommSettings,
00649                                                                                         uiRecordOffset,
00650                                                                                         uiNoOfRecords,
00651                                                                                         uiRecordSize,
00652                                                                                         pucRecordData );
00653 }
00654 
00655         // [0xEB] : [0xC1] DESFire Commands
00656 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::ClearRecordFile(
00657         unsigned int uiApplicationID,
00658         unsigned char ucReaderKeyIndex,
00659         unsigned char ucDESFireKeyNo,
00660         unsigned char ucFileNo,
00661         unsigned char ucFileCommSettings )
00662 {
00663         return m_pParent->m_pImpl_C1->ClearRecordFile(  uiApplicationID,
00664                                                                                                 ucReaderKeyIndex,
00665                                                                                                 ucDESFireKeyNo,
00666                                                                                                 ucFileNo,
00667                                                                                                 ucFileCommSettings );
00668 }
00669 
00670         // [0xC7] : T=CL
00671 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::CommitTransaction(
00672         unsigned char* pucResponseData,
00673         unsigned int uiResponseBufferLength,
00674         unsigned int& uiResponseLength )
00675 {
00676         return m_pParent->m_pImpl_C1->CommitTransaction(        pucResponseData, 
00677                                                                                                         uiResponseBufferLength, 
00678                                                                                                         uiResponseLength );
00679 }
00680 
00681         // [0xA7] : T=CL
00682 int FedmIscTagHandler_ISO14443_4_MIFARE_DESFire_SoftCrypto::AbortTransaction(
00683         unsigned char* pucResponseData,
00684         unsigned int uiResponseBufferLength,
00685         unsigned int& uiResponseLength )
00686 {
00687         return m_pParent->m_pImpl_C1->AbortTransaction( pucResponseData, 
00688                                                                                                         uiResponseBufferLength, 
00689                                                                                                         uiResponseLength );
00690 }
00691 
00692 #endif // #if !defined(_FEDM_NO_TAG_HANDLER_ISO14443)


maggie_rfid_drivers
Author(s): Raul Perula-Martinez
autogenerated on Mon Sep 14 2015 03:05:30