Here are listed all the functions that implement the Wifi Crypto APIs.
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] | u16PrngSize | Size of the required random bytes to be generated. |
[in] | pu8PrngBuff | Pointer 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] | pu8PrngBuff | Pointer to a buffer to receive data. |
[in] | u16PrngSize | Request 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.
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] | pu8PrngBuff | Pointer to a buffer to receive data. |
[in] | u16PrngSize | Requested 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.