244 #ifndef ti_drivers_TRNG__include 245 #define ti_drivers_TRNG__include 269 #define TRNG_STATUS_RESERVED (-32) 277 #define TRNG_STATUS_SUCCESS (0) 285 #define TRNG_STATUS_ERROR (-1) 295 #define TRNG_STATUS_RESOURCE_UNAVAILABLE (-2) 302 #define TRNG_STATUS_INVALID_INPUTS (-3) 307 #define TRNG_STATUS_CANCELED (-4) 315 #define TRNG_STATUS_KEYSTORE_ERROR (-5) 410 int_fast16_t returnValue,
411 uint8_t *randomBytes,
412 size_t randomBytesSize);
592 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.
ADC_Params params
Definition: Driver_Init.h:11
The CryptoKey type is an opaque representation of a cryptographic key.
TRNG Parameters.
Definition: TRNG.h:434
TRNG_ReturnBehavior returnBehavior
Definition: TRNG.h:436
uint32_t timeout
Definition: TRNG.h:443
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:328
CryptoKey datastructure.
Definition: CryptoKey.h:192
TRNG_Config * TRNG_Handle
A handle that is returned from a TRNG_open() call.
Definition: TRNG.h:340
TRNG_CryptoKeyCallbackFxn cryptoKeyCallbackFxn
Definition: TRNG.h:437
void TRNG_close(TRNG_Handle handle)
Function to close a TRNG peripheral specified by the TRNG handle.
TRNG_RandomBytesCallbackFxn randomBytesCallbackFxn
Definition: TRNG.h:440
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:394
TRNG_ReturnBehavior
The way in which TRNG function calls return after generating the requested entropy.
Definition: TRNG.h:363
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:420
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:334
void * object
Definition: TRNG.h:331
void * custom
Definition: TRNG.h:446
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:409