Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Crypto

         Here are listed all the functions that implement the Wifi Crypto APIs.

Functions

sint8 m2m_wifi_prng_get_random_bytes (uint8 *pu8PrngBuff, uint16 u16PrngSize)
 Get random bytes using the PRNG bytes. More...
 

sint8 m2m_wifi_prng_get_random_bytes ( uint8 pu8PrngBuff,
uint16  u16PrngSize 
)

Get random bytes using the PRNG bytes.

Asynchronous function for retrieving from the firmware a pseudo-random set of bytes.

Parameters
[in]u16PrngSizeSize of the required random bytes to be generated.
[in]pu8PrngBuffPointer to user allocated buffer.
Returns
The function SHALL return M2M_SUCCESS for success and a negative value otherwise.
Asynchronous function for retrieving from the firmware a pseudo-random set of bytes as specified in the size passed in as a parameter.
The registered wifi-cb function retrieves the random bytes through the response @ref M2M_WIFI_RESP_GET_PRNG
Parameters
[in]pu8PrngBuffPointer to a buffer to receive data.
[in]u16PrngSizeRequested size in bytes. Maximum 1580.
Warning
Size greater than the maximum specified (1580) causes a negative error M2M_ERR_FAIL.
Returns
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.
Asynchronous function for retrieving from the firmware a pseudo-random set of bytes as specified in the size passed in as a parameter.
The registered wifi-cb function retrieves the random bytes through the response @ref M2M_WIFI_RESP_GET_PRNG
Parameters
[in]pu8PrngBuffPointer to a buffer to receive data.
[in]u16PrngSizeRequest size in bytes
Warning
Size greater than the maximum specified (M2M_BUFFER_MAX_SIZE - sizeof(tstrPrng)) causes a negative error M2M_ERR_FAIL.
Returns
The function returns M2M_SUCCESS for successful operations and a negative value otherwise.