NXP Reader Library  v17.1.0.2535

Random Number Command of HAL DUT Command dispatcher frame. More...

Collaboration diagram for Command_CryptoRng:

Modules

 Command_Codes
 Random Number Command Codes of HAL DUT Command dispatcher frame.
 

Functions

phStatus_t phhalHw_DUT_Cmd_CryptoRng_Init (phhalHw_DUT_DataParams_t *pDataParams)
 Initialize Hardware random number generator. More...
 
phStatus_t phhalHw_DUT_Cmd_CryptoRng_DeInit (phhalHw_DUT_DataParams_t *pDataParams)
 Un-Initialize Hardware random number generator. More...
 
phStatus_t phhalHw_DUT_Cmd_CryptoRng_GetLastStatus (phhalHw_DUT_DataParams_t *pDataParams, uint16_t wStatusMsgLen, int8_t *pStatusMsg, int32_t *pStatusCode)
 Returns the status code and respective message. More...
 
phStatus_t phhalHw_DUT_Cmd_CryptoRng_Seed (phhalHw_DUT_DataParams_t *pDataParams, uint8_t *pSeed, uint8_t bSeedLen)
 Seeds the random number generator with the given seed. More...
 
phStatus_t phhalHw_DUT_Cmd_CryptoRng_Rnd (phhalHw_DUT_DataParams_t *pDataParams, uint16_t wNoOfRndBytes, uint8_t *pRnd)
 Obtains random bytes from the random source. More...
 

Detailed Description

Random Number Command of HAL DUT Command dispatcher frame.

Function Documentation

◆ phhalHw_DUT_Cmd_CryptoRng_Init()

phStatus_t phhalHw_DUT_Cmd_CryptoRng_Init ( phhalHw_DUT_DataParams_t pDataParams)

Initialize Hardware random number generator.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phhalHw_DUT_Cmd_CryptoRng_DeInit()

phStatus_t phhalHw_DUT_Cmd_CryptoRng_DeInit ( phhalHw_DUT_DataParams_t pDataParams)

Un-Initialize Hardware random number generator.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.

◆ phhalHw_DUT_Cmd_CryptoRng_GetLastStatus()

phStatus_t phhalHw_DUT_Cmd_CryptoRng_GetLastStatus ( phhalHw_DUT_DataParams_t pDataParams,
uint16_t  wStatusMsgLen,
int8_t pStatusMsg,
int32_t pStatusCode 
)

Returns the status code and respective message.

This interfaces is supported only if CryptoRng component is initialized with mBedTLS Initialization.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wStatusMsgLen[In] Size of bytes allocated for pStatusMsg parameter.
[out]pStatusMsg[Out] The equivalent status message for the information available in pStatusCode.
[out]pStatusCode[Out] The status code returned by the underlying Crypto library.

◆ phhalHw_DUT_Cmd_CryptoRng_Seed()

phStatus_t phhalHw_DUT_Cmd_CryptoRng_Seed ( phhalHw_DUT_DataParams_t pDataParams,
uint8_t pSeed,
uint8_t  bSeedLen 
)

Seeds the random number generator with the given seed.

The seed length is dependent on the underlaying implementation. Further details can be found in the detailed description of the underlying layers.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMS
  • If the interface context (pDataparams) is not holding this layer ID.
  • If the component context holds a different sub-component ID that is not supported by this layer.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]pSeed[In] Seed
[in]bSeedLen[In] Size of the seed.

◆ phhalHw_DUT_Cmd_CryptoRng_Rnd()

phStatus_t phhalHw_DUT_Cmd_CryptoRng_Rnd ( phhalHw_DUT_DataParams_t pDataParams,
uint16_t  wNoOfRndBytes,
uint8_t pRnd 
)

Obtains random bytes from the random source.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_INVALID_DATA_PARAMS
  • If the interface context (pDataparams) is not holding this layer ID.
  • If the component context holds a different sub-component ID that is not supported by this layer.
PH_ERR_INVALID_PARAMETER- If the buffer is null.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]wNoOfRndBytes[In] Number of random bytes to generate.
[out]pRnd[Out] Generated bytes; uint8_t[wNoOfRndBytes]