369 #ifndef ti_drivers_TRNG__include 370 #define ti_drivers_TRNG__include 394 #define TRNG_STATUS_RESERVED (-32) 402 #define TRNG_STATUS_SUCCESS (0) 410 #define TRNG_STATUS_ERROR (-1) 420 #define TRNG_STATUS_RESOURCE_UNAVAILABLE (-2) 427 #define TRNG_STATUS_INVALID_INPUTS (-3) 432 #define TRNG_STATUS_CANCELED (-4) 440 #define TRNG_STATUS_KEYSTORE_ERROR (-5) 535 int_fast16_t returnValue,
536 uint8_t *randomBytes,
537 size_t randomBytesSize);
731 int_fast16_t
TRNG_getRandomBytes(TRNG_Handle handle,
void *randomBytes,
size_t randomBytesSize);
TRNG_Handle TRNG_open(uint_least8_t index, TRNG_Params *params)
This function opens a given TRNG peripheral.
The CryptoKey type is an opaque representation of a cryptographic key.
TRNG Parameters.
Definition: TRNG.h:559
TRNG_ReturnBehavior returnBehavior
Definition: TRNG.h:561
uint32_t timeout
Definition: TRNG.h:568
int_fast16_t TRNG_generateEntropy(TRNG_Handle handle, CryptoKey *entropy)
Generate random bytes and output to the given CryptoKey object.
int_fast16_t TRNG_cancelOperation(TRNG_Handle handle)
Aborts an ongoing TRNG operation and clears internal buffers.
TRNG Global configuration.
Definition: TRNG.h:453
CryptoKey datastructure.
Definition: CryptoKey.h:211
TRNG_Config * TRNG_Handle
A handle that is returned from a TRNG_open() call.
Definition: TRNG.h:465
TRNG_CryptoKeyCallbackFxn cryptoKeyCallbackFxn
Definition: TRNG.h:562
void TRNG_close(TRNG_Handle handle)
Function to close a TRNG peripheral specified by the TRNG handle.
TRNG_RandomBytesCallbackFxn randomBytesCallbackFxn
Definition: TRNG.h:565
void(* TRNG_CryptoKeyCallbackFxn)(TRNG_Handle handle, int_fast16_t returnValue, CryptoKey *entropy)
The definition of a callback function used by the TRNG driver when TRNG_generateKey() is called with ...
Definition: TRNG.h:519
TRNG_ReturnBehavior
The way in which TRNG function calls return after generating the requested entropy.
Definition: TRNG.h:488
const TRNG_Params TRNG_defaultParams
Default TRNG_Params structure.
int_fast16_t TRNG_getRandomBytes(TRNG_Handle handle, void *randomBytes, size_t randomBytesSize)
Generate random bytes and output to the given array.
void TRNG_Params_init(TRNG_Params *params)
Function to initialize the TRNG_Params struct to its defaults.
TRNG_CryptoKeyCallbackFxn TRNG_CallbackFxn
The definition of a callback function used by the TRNG driver when used in TRNG_RETURN_BEHAVIOR_CALLB...
Definition: TRNG.h:545
void TRNG_init(void)
This function initializes the TRNG module.
int_fast16_t TRNG_generateKey(TRNG_Handle handle, CryptoKey *entropy)
Generate random bytes and output to the given CryptoKey object.
TRNG_Handle TRNG_construct(TRNG_Config *config, const TRNG_Params *params)
Constructs a new TRNG object.
void const * hwAttrs
Definition: TRNG.h:459
void * object
Definition: TRNG.h:456
void * custom
Definition: TRNG.h:571
void(* TRNG_RandomBytesCallbackFxn)(TRNG_Handle handle, int_fast16_t returnValue, uint8_t *randomBytes, size_t randomBytesSize)
The definition of a callback function used by the TRNG driver when TRNG_getRandomBytes() is called wi...
Definition: TRNG.h:534