NXP NFC Reader Library  v4.040.05.011646
CryptoRng

This is only a wrapper layer to abstract the different crypto random number generator implementations. More...

Collaboration diagram for CryptoRng:

Modules

 Component : Software
 Software implementation of the phCryptoRng interface.
 

Functions

phStatus_t phCryptoRng_Seed (void *pDataParams, uint8_t *bSeed, uint8_t bSeedLength)
 Seeds the random number generator with the given seed. More...
 
phStatus_t phCryptoRng_Rnd (void *pDataParams, uint16_t wNoOfRndBytes, uint8_t *pRnd)
 Obtains random bytes from the random source. More...
 

Detailed Description

This is only a wrapper layer to abstract the different crypto random number generator implementations.

With this wrapper it is possible to support more than one crypto random number generator implementation in parallel, by adapting this wrapper.

Important hints for users of this component:

Function Documentation

§ phCryptoRng_Seed()

phStatus_t phCryptoRng_Seed ( void *  pDataParams,
uint8_t bSeed,
uint8_t  bSeedLength 
)

Seeds the random number generator with the given seed.

The seed length is dependend 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.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]bSeedSeed
[in]bSeedLengthSize of the seed.

§ phCryptoRng_Rnd()

phStatus_t phCryptoRng_Rnd ( void *  pDataParams,
uint16_t  wNoOfRndBytes,
uint8_t pRnd 
)

Obtains random bytes from the random source.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]wNoOfRndBytesnumber of random bytes to generate
[out]pRndgenerated bytes; uint8_t[dwNumBytes]