NXP Reader Library  v17.1.0.2535
MIFARE(R) Ultralight

This is only a wrapper layer to abstract the different MIFARE Ultralight / NTAG implementations. With this wrapper it is possible to support more than one MIFARE Ultralight / NTAG implementation in parallel, by adapting this wrapper. More...

Collaboration diagram for MIFARE(R) Ultralight:

Modules

 Component : Software
 Software implementation of the MIFARE Ultralight / NTAG commands. Here the MIFARE Ultralight / NTAG commands are framed and exchanged to PICC.
 
 Component : Sam_NonX
 SAM NonX implementation of the MIFARE Ultralight / NTAG commands. Here the MIFARE Ultralight / NTAG commands are framed and exchanged to PICC.
 
 Component : Sam_X
 SAM X implementation of the MIFARE Ultralight / NTAG commands. Here the MIFARE Ultralight / NTAG commands are framed and exchanged to PICC.
 
 Defines
 

Functions

phStatus_t phalMful_UlcAuthenticate (void *pDataParams, uint8_t bOption, uint16_t wKeyNo, uint16_t wKeyVer, uint8_t *pDivInput, uint8_t bDivInputLen)
 Perform MIFARE(R) Ultralight-C Authenticate command with PICC. More...
 
phStatus_t phalMful_AuthenticateAES (void *pDataParams, uint8_t bOption, uint16_t wKeyNo, uint16_t wKeyVer, uint8_t bRamKeyNo, uint8_t bRamKeyVer, uint8_t bKeyNoCard, uint8_t *pDivInput, uint8_t bDivLen)
 Perform MIFARE(R) Ultralight / NTAG AES Authentication with PICC. More...
 
phStatus_t phalMful_Read (void *pDataParams, uint8_t bAddress, uint8_t *pData)
 Perform MIFARE(R) Ultralight / NTAG Read command with PICC. More...
 
phStatus_t phalMful_Write (void *pDataParams, uint8_t bAddress, uint8_t *pData)
 Perform MIFARE(R) Ultralight / NATG Write command with PICC. More...
 
phStatus_t phalMful_FastWrite (void *pDataParams, uint8_t *pData)
 Perform NATG Fast Write command which writes 64 bytes from 0xF0 to 0xFF address blocks. More...
 
phStatus_t phalMful_CompatibilityWrite (void *pDataParams, uint8_t bAddress, uint8_t *pData)
 Perform MIFARE(R) Ultralight / NATG Compatibility-Write command with PICC. More...
 
phStatus_t phalMful_IncrCnt (void *pDataParams, uint8_t bCntNum, uint8_t *pCnt)
 Perform MIFARE(R) Ultralight Increment count command with PICC. More...
 
phStatus_t phalMful_ReadCnt (void *pDataParams, uint8_t bCntNum, uint8_t *pCntValue)
 Perform MIFARE(R) Ultralight / NATG Read count command with PICC. More...
 
phStatus_t phalMful_PwdAuth (void *pDataParams, uint8_t bOption, uint8_t bKeyNo, uint8_t bKeyVer, uint8_t *pDivInput, uint8_t bDivInputLen, uint8_t *pPwd, uint8_t *pPack)
 Perform MIFARE(R) Ultralight / NATG Password auth command with PICC. More...
 
phStatus_t phalMful_GetVersion (void *pDataParams, uint8_t *pVersion)
 Perform MIFARE(R) Ultralight / NATG get version command with PICC. More...
 
phStatus_t phalMful_FastRead (void *pDataParams, uint8_t bStartAddr, uint8_t bEndAddr, uint8_t **pData, uint16_t *wNumBytes)
 Perform MIFARE(R) Ultralight / NATG Fast read command with PICC. More...
 
phStatus_t phalMful_SectorSelect (void *pDataParams, uint8_t bSecNo)
 Perform NTAG Sector Select within PICC. More...
 
phStatus_t phalMful_ReadSign (void *pDataParams, uint8_t bAddr, uint8_t **pSignature)
 Perform MIFARE(R) Ultralight / NATG read signature command with PICC. More...
 
phStatus_t phalMful_ChkTearingEvent (void *pDataParams, uint8_t bCntNum, uint8_t *pValidFlag)
 Perform MIFARE(R) Ultralight EV1 check tearing event command with PICC. More...
 
phStatus_t phalMful_WriteSign (void *pDataParams, uint8_t bAddress, uint8_t *pSignature)
 Perform MIFARE(R) Ultralight / NATG Write Signature command with PICC. More...
 
phStatus_t phalMful_LockSign (void *pDataParams, uint8_t bLockMode)
 Perform MIFARE(R) Ultralight / NATG Lock Signature command with PICC. More...
 
phStatus_t phalMful_VirtualCardSelect (void *pDataParams, uint8_t *pVCIID, uint8_t bVCIIDLen, uint8_t *pVCTID)
 Perform MIFARE(R) Ultralight Virtual Card Select command with PICC. More...
 
phStatus_t phalMful_ReadTTStatus (void *pDataParams, uint8_t bAddr, uint8_t *pData)
 Perform NTAG Tag Temper Status Read. More...
 
phStatus_t phalMful_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue)
 Perform a GetConfig command. More...
 
phStatus_t phalMful_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue)
 Perform a SetConfig command. More...
 
phStatus_t phalMful_CalculateSunCMAC (void *pDataParams, uint16_t wKeyNo, uint16_t wKeyVer, uint8_t *pInData, uint16_t wInDataLen, uint8_t *pRespMac)
 Calculate SUNCMAC. More...
 

Detailed Description

This is only a wrapper layer to abstract the different MIFARE Ultralight / NTAG implementations. With this wrapper it is possible to support more than one MIFARE Ultralight / NTAG implementation in parallel, by adapting this wrapper.

Note

Function Documentation

◆ phalMful_UlcAuthenticate()

phStatus_t phalMful_UlcAuthenticate ( void *  pDataParams,
uint8_t  bOption,
uint16_t  wKeyNo,
uint16_t  wKeyVer,
uint8_t pDivInput,
uint8_t  bDivInputLen 
)

Perform MIFARE(R) Ultralight-C Authenticate command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_AUTH_ERRORAuthentication failure.
PH_ERR_PROTOCOL_ERRORUnexpected PICC response length or unexpected first byte received from PICC.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] Option for specifying the diversification input. Only valid for Sam AV3
[in]wKeyNo[In] Key number to be used in authentication.
[in]wKeyVer[In] Key version to be used in authentication.
[in]pDivInput[In] Diversification input for key diversification. (1 to 31 byte(s) input).
[in]bDivInputLen[In] Length of diversification input.

◆ phalMful_AuthenticateAES()

phStatus_t phalMful_AuthenticateAES ( void *  pDataParams,
uint8_t  bOption,
uint16_t  wKeyNo,
uint16_t  wKeyVer,
uint8_t  bRamKeyNo,
uint8_t  bRamKeyVer,
uint8_t  bKeyNoCard,
uint8_t pDivInput,
uint8_t  bDivLen 
)

Perform MIFARE(R) Ultralight / NTAG AES Authentication with PICC.

This will be using the AES128 keys and will generate and verify the contents based on generic AES algorithm.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_AUTH_ERRORAuthentication failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] Option for specifying the diversification input.
[in]wKeyNo[In] Key number to be used in authentication.
[in]wKeyVer[In] Key version to be used in authentication.
[in]bRamKeyNo[In] Key number of Destination Key where the computed session key will be stored. To be used for SAM AV3 only.
[in]bRamKeyVer[In] Key version of Destination Key where the computed session key will be stored. To be used for SAM AV3 only.
[in]bKeyNoCard[In] Key number on card.
[in]pDivInput[In] Diversification input. Can be NULL.
[in]bDivLen[In] Length of diversification input max 31B.

◆ phalMful_Read()

phStatus_t phalMful_Read ( void *  pDataParams,
uint8_t  bAddress,
uint8_t pData 
)

Perform MIFARE(R) Ultralight / NTAG Read command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bAddress[In] Address on PICC to read from.
[out]pData[Out] pData[PHAL_MFUL_READ_BLOCK_LENGTH] containing data returned from the PICC.

◆ phalMful_Write()

phStatus_t phalMful_Write ( void *  pDataParams,
uint8_t  bAddress,
uint8_t pData 
)

Perform MIFARE(R) Ultralight / NATG Write command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bAddress[In] Address on PICC to write to.
[in]pData[In] pData[PHAL_MFUL_WRITE_BLOCK_LENGTH] containing block to be written to the PICC.

◆ phalMful_FastWrite()

phStatus_t phalMful_FastWrite ( void *  pDataParams,
uint8_t pData 
)

Perform NATG Fast Write command which writes 64 bytes from 0xF0 to 0xFF address blocks.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pData[In] Buffer containing the block data to be written to the PICC.

◆ phalMful_CompatibilityWrite()

phStatus_t phalMful_CompatibilityWrite ( void *  pDataParams,
uint8_t  bAddress,
uint8_t pData 
)

Perform MIFARE(R) Ultralight / NATG Compatibility-Write command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bAddress[In] Address on PICC to write to.
[in]pData[In] pData[PHAL_MFUL_COMPWRITE_BLOCK_LENGTH] containing block to be written to the PICC.

◆ phalMful_IncrCnt()

phStatus_t phalMful_IncrCnt ( void *  pDataParams,
uint8_t  bCntNum,
uint8_t pCnt 
)

Perform MIFARE(R) Ultralight Increment count command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bCntNum[In] One byte counter number 00 to 02
[in]pCnt[In] pCnt[4] counter value LSB first. Only first three data bytes are used by the PICC. The 4th byte is ignored

◆ phalMful_ReadCnt()

phStatus_t phalMful_ReadCnt ( void *  pDataParams,
uint8_t  bCntNum,
uint8_t pCntValue 
)

Perform MIFARE(R) Ultralight / NATG Read count command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bCntNum[In] One byte counter number 00 to 02
[out]pCntValue[Out] pCntValue[3] counter value. LSB first. Three bytes counter value returned from PICC.

◆ phalMful_PwdAuth()

phStatus_t phalMful_PwdAuth ( void *  pDataParams,
uint8_t  bOption,
uint8_t  bKeyNo,
uint8_t  bKeyVer,
uint8_t pDivInput,
uint8_t  bDivInputLen,
uint8_t pPwd,
uint8_t pPack 
)

Perform MIFARE(R) Ultralight / NATG Password auth command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_AUTH_ERRORAuthentication failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bOption[In] One of the below options should be used. This option byte is supported for Sam component only.
[in]bKeyNo[In] Key number to be used in Sam hardware. Only valid for Sam AV3 NonX and X mode.
[in]bKeyVer[In] Key version to be used in Sam hardware. Only valid for Sam AV3 NonX and X mode.
[in]pDivInput[In] Diversification input. Only valid for Sam AV3 NonX and X mode.
[in]bDivInputLen[In] Diversification input length. Only valid for Sam AV3 NonX and X mode.
[in]pPwd[In] Four byte array of type uint8_t containing four password bytes.
  • For software layer, the user has to pass the password information.
  • For Sam AV3 NonX layer, the parameter will be updated with the password generated by Sam hardware.
[out]pPack[Out] Two byte array of type uint8_t containing two password acknowledge bytes
For software and Sam AV3 NonX layer, the user will be provided with the Pack information returned by the card.

◆ phalMful_GetVersion()

phStatus_t phalMful_GetVersion ( void *  pDataParams,
uint8_t pVersion 
)

Perform MIFARE(R) Ultralight / NATG get version command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[out]pVersion[Out] An eight byte array containing version information bytes

◆ phalMful_FastRead()

phStatus_t phalMful_FastRead ( void *  pDataParams,
uint8_t  bStartAddr,
uint8_t  bEndAddr,
uint8_t **  pData,
uint16_t wNumBytes 
)

Perform MIFARE(R) Ultralight / NATG Fast read command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bStartAddr[In] One byte start address
[in]bEndAddr[In] One byte end address
[out]pData[Out] Pointer to the data read from the card. The bytes are stored on the HAL's Rx buffer.
[out]wNumBytes[Out] Contains number of bytes read from the card

◆ phalMful_SectorSelect()

phStatus_t phalMful_SectorSelect ( void *  pDataParams,
uint8_t  bSecNo 
)

Perform NTAG Sector Select within PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bSecNo[In] The number of the sector to be selected.

◆ phalMful_ReadSign()

phStatus_t phalMful_ReadSign ( void *  pDataParams,
uint8_t  bAddr,
uint8_t **  pSignature 
)

Perform MIFARE(R) Ultralight / NATG read signature command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bAddr[In] Value is always 00. Present for forward compatibility reasons
[out]pSignature[Out] Pointer to a 32/48 byte signature read from the card

◆ phalMful_ChkTearingEvent()

phStatus_t phalMful_ChkTearingEvent ( void *  pDataParams,
uint8_t  bCntNum,
uint8_t pValidFlag 
)

Perform MIFARE(R) Ultralight EV1 check tearing event command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bCntNum[In] Value specifying the counter number 00 to 02
[out]pValidFlag[Out] Address of one byte containing the valid flag byte

◆ phalMful_WriteSign()

phStatus_t phalMful_WriteSign ( void *  pDataParams,
uint8_t  bAddress,
uint8_t pSignature 
)

Perform MIFARE(R) Ultralight / NATG Write Signature command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bAddress[In] Relative page location of the signature part to be written.
[out]pSignature[Out] 4 bytes of signature value to be written to the specified relative page address.

◆ phalMful_LockSign()

phStatus_t phalMful_LockSign ( void *  pDataParams,
uint8_t  bLockMode 
)

Perform MIFARE(R) Ultralight / NATG Lock Signature command with PICC.

This command locks the signature temporarily or permanently based on the information provided in the API. The locking and unlocking of the signature can be performed using this command if the signature is not locked or temporary locked. If the signature is permanently locked, then the unlocking cannot be done.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bLockMode[In] Configuration to Lock, Unlock and Permanently Lock the signature data.

◆ phalMful_VirtualCardSelect()

phStatus_t phalMful_VirtualCardSelect ( void *  pDataParams,
uint8_t pVCIID,
uint8_t  bVCIIDLen,
uint8_t pVCTID 
)

Perform MIFARE(R) Ultralight Virtual Card Select command with PICC.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pVCIID[In] The Virtual Card Installation Identifier data for selecting the VC.
[in]bVCIIDLen[In] Length of the VCIID data.
[out]pVCTID[Out] 1 byte of Virtual card type identifier data.

◆ phalMful_ReadTTStatus()

phStatus_t phalMful_ReadTTStatus ( void *  pDataParams,
uint8_t  bAddr,
uint8_t pData 
)

Perform NTAG Tag Temper Status Read.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bAddr[In] Value is always 00. Present for forward compatibility reason
[out]pData[Out] 5 bytes of Tag Temper Status.

◆ phalMful_GetConfig()

phStatus_t phalMful_GetConfig ( void *  pDataParams,
uint16_t  wConfig,
uint16_t pValue 
)

Perform a GetConfig command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_UNSUPPORTED_PARAMETERIf the configuration identifier is not supported.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration to get the status of CMAC inclusion in command / response.
[out]pValue[Out] The value for the mentioned configuration.

◆ phalMful_SetConfig()

phStatus_t phalMful_SetConfig ( void *  pDataParams,
uint16_t  wConfig,
uint16_t  wValue 
)

Perform a SetConfig command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_UNSUPPORTED_PARAMETERIf the configuration identifier is not supported.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wConfig[In] Configuration to set the status of CMAC inclusion in command / response.
[in]wValue[In] The value for the mentioned configuration.

◆ phalMful_CalculateSunCMAC()

phStatus_t phalMful_CalculateSunCMAC ( void *  pDataParams,
uint16_t  wKeyNo,
uint16_t  wKeyVer,
uint8_t pInData,
uint16_t  wInDataLen,
uint8_t pRespMac 
)

Calculate SUNCMAC.

Note
For the parameter pInData, Caller has to remove the ASCII formated data before passing to this interface.
If the information is having TT status, User has to convert the ASCII bytes representation to NonASCII format.
  • 43h should be converted to 03h
  • 4Fh should be converted to 0Fh
  • 49h should be converted to 09h
Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMSIf DataParams is null.
PH_ERR_INVALID_PARAMETERIf the buffer is null.
PH_ERR_INTEGRITY_ERRORCMAC verification failure.
XXXX
  • Depending on status codes return by PICC.
  • Other Depending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]wKeyNo[In] Key number to be used from software or hardware KeyStore.
[in]wKeyVer[In] Key version to be used from software or hardware KeyStore.
[in]pInData[In] Input Data for which the MAC to be calculated.
[in]wInDataLen[In] Length of bytes available in InData buffer.
[out]pRespMac[Out] Computed SUN CMAC.