PAL DRBG - platform. This file contains the real-time OS APIs that need to be implemented in the platform layer. More...
#include "pal.h"
Go to the source code of this file.
Functions | |
palStatus_t | pal_plat_DRBGInit (void) |
Initialize all data structures (semaphores, mutexes, memory pools, message queues) at system initialization. More... | |
palStatus_t | pal_plat_DRBGDestroy (void) |
De-initialize thread objects. More... | |
palStatus_t | pal_plat_osRandomBuffer (uint8_t *randomBuf, size_t bufSizeBytes, size_t *actualRandomSizeBytes) |
Generate a random number into the given buffer with the given size in bytes. More... | |
palStatus_t | pal_plat_osRandomBuffer_blocking (uint8_t *randomBuf, size_t bufSizeBytes) |
Generate random number into given buffer with given size in bytes. More... | |
PAL DRBG - platform. This file contains the real-time OS APIs that need to be implemented in the platform layer.
palStatus_t pal_plat_DRBGDestroy | ( | void | ) |
De-initialize thread objects.
palStatus_t pal_plat_DRBGInit | ( | void | ) |
Initialize all data structures (semaphores, mutexes, memory pools, message queues) at system initialization.
In case of a failure in any of the initializations, the function returns an error and stops the rest of the initializations.
palStatus_t pal_plat_osRandomBuffer | ( | uint8_t * | randomBuf, |
size_t | bufSizeBytes, | ||
size_t * | actualRandomSizeBytes | ||
) |
Generate a random number into the given buffer with the given size in bytes.
[out] | randomBuf | A buffer to hold the generated number. |
[in] | bufSizeBytes | The size of the buffer and the size of the required random number to generate. |
[out] | actualRandomSizeBytes | The actual size of the written random data to the output buffer. |
bufSizeBytes
the function must return PAL_ERR_RTOS_TRNG_PARTIAL_DATA
palStatus_t pal_plat_osRandomBuffer_blocking | ( | uint8_t * | randomBuf, |
size_t | bufSizeBytes | ||
) |
Generate random number into given buffer with given size in bytes.
[out] | randomBuf | A buffer to hold the generated number. |
[in] | bufSizeBytes | The size of the buffer and the size of the required random number to generate. |
pal_init()
MUST be called before this function pal_plat_osEntropyInject()
.