248 #ifndef ti_drivers_RNG__include 249 #define ti_drivers_RNG__include 273 #define RNG_STATUS_RESERVED (-32) 281 #define RNG_STATUS_SUCCESS ((int_fast16_t)0) 289 #define RNG_STATUS_ERROR ((int_fast16_t)-1) 300 #define RNG_STATUS_RESOURCE_UNAVAILABLE ((int_fast16_t)-2) 307 #define RNG_STATUS_INVALID_INPUTS ((int_fast16_t)-3) 312 #define RNG_STATUS_CANCELED ((int_fast16_t)-4) 319 #define RNG_ENTROPY_EXHAUSTED ((int_fast16_t)-5) 326 #define RNG_STATUS_INIT_NOT_ALLOWED ((int_fast16_t)-6) 331 #define RNG_MAX_BIT_LENGTH ((size_t)1u << 20u) 438 int_fast16_t returnValue,
440 size_t randomBitsLength);
600 int_fast16_t
RNG_getRandomBits(RNG_Handle handle,
void *randomBits,
size_t randomBitsLength);
655 const void *lowerLimit,
656 const void *upperLimit,
658 size_t randomNumberBitLength);
713 const void *lowerLimit,
714 const void *upperLimit,
716 size_t randomNumberBitLength);
800 const void *lowerLimit,
801 const void *upperLimit,
803 size_t randomNumberBitLength);
855 const void *lowerLimit,
856 const void *upperLimit,
858 size_t randomNumberBitLength);
ADC_Params params
Definition: Driver_Init.h:11
const RNG_Params RNG_defaultParams
Default RNG_Params structure.
The CryptoKey type is an opaque representation of a cryptographic key.
RNG_ReturnBehavior returnBehavior
Definition: RNG.h:456
int_fast16_t RNG_init(void)
This function initializes the RNG module.
RNG_RandomBitsCallbackFxn randomBitsCallbackFxn
Definition: RNG.h:461
int_fast16_t RNG_generateKey(RNG_Handle handle, CryptoKey *key)
Generate random bits and output them to the given CryptoKey object.
const size_t RNG_poolByteSize
The byte size of the pool.
void * object
Definition: RNG.h:347
CryptoKey datastructure.
Definition: CryptoKey.h:192
int_fast16_t RNG_generateBEKeyInRange(RNG_Handle handle, const void *lowerLimit, const void *upperLimit, CryptoKey *key, size_t randomNumberBitLength)
Generate random number, stored in big-endian (BE) format, where the number is within the specified ra...
RNG_ReturnBehavior
The way in which RNG function calls return after generating the requested entropy.
Definition: RNG.h:382
RNG_Handle RNG_construct(const RNG_Config *config, const RNG_Params *params)
Constructs a new RNG object.
int_fast16_t RNG_getBERandomNumberInRange(RNG_Handle handle, const void *lowerLimit, const void *upperLimit, void *randomNumber, size_t randomNumberBitLength)
Generate random number, stored in big-endian (BE) format, where the number is within the specified ra...
RNG_CryptoKeyCallbackFxn cryptoKeyCallbackFxn
Definition: RNG.h:457
void(* RNG_RandomBitsCallbackFxn)(RNG_Handle handle, int_fast16_t returnValue, uint8_t *randomBits, size_t randomBitsLength)
The definition of a callback function used by the RNG driver when RNG_getRandomBits(), RNG_getLERandomNumberInRange(), or RNG_getBERandomNumberInRange is called with RNG_RETURN_BEHAVIOR_CALLBACK.
Definition: RNG.h:437
void RNG_close(RNG_Handle handle)
Function to close a RNG peripheral specified by the RNG handle.
int_fast16_t RNG_fillPoolIfLessThan(size_t bytes)
Fills the pool with entropy if the number of bytes with entropy in the pool is less than the value sp...
void const * hwAttrs
Definition: RNG.h:350
uint32_t timeout
Definition: RNG.h:466
int_fast16_t RNG_getLERandomNumberInRange(RNG_Handle handle, const void *lowerLimit, const void *upperLimit, void *randomNumber, size_t randomNumberBitLength)
Generate random number, stored in little-endian (LE) format, where the number is within the specified...
int_fast16_t RNG_getRandomBits(RNG_Handle handle, void *randomBits, size_t randomBitsLength)
Generate random bits and output to the given array.
int_fast16_t RNG_cancelOperation(RNG_Handle handle)
Aborts an ongoing RNG operation and clears internal buffers.
int_fast16_t RNG_generateLEKeyInRange(RNG_Handle handle, const void *lowerLimit, const void *upperLimit, CryptoKey *key, size_t randomNumberBitLength)
Generate random number, in little-endian (LE) format, where the number is within the specified range...
RNG_Handle RNG_open(uint_least8_t index, const RNG_Params *params)
This function opens a given RNG peripheral.
RNG Parameters.
Definition: RNG.h:454
RNG Global configuration.
Definition: RNG.h:344
void RNG_Params_init(RNG_Params *params)
Function to initialize the RNG_Params struct to its defaults.
const RNG_Config * RNG_Handle
A handle that is returned from a RNG_open() call.
Definition: RNG.h:356
void(* RNG_CryptoKeyCallbackFxn)(RNG_Handle handle, int_fast16_t returnValue, CryptoKey *key)
The definition of a callback function used by the RNG driver when RNG_generateKey(), RNG_generateLEKeyInRange(), or RNG_generateBEKeyInRange() is called with RNG_RETURN_BEHAVIOR_CALLBACK.
Definition: RNG.h:417