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) 334 #define RNG_STATUS_NOISE_INPUT_INVALID ((int_fast16_t)-7) 342 #define RNG_STATUS_NOT_INITIALIZED ((int_fast16_t)-7) 347 #define RNG_MAX_BIT_LENGTH ((size_t)1u << 20u) 454 int_fast16_t returnValue,
456 size_t randomBitsLength);
625 int_fast16_t
RNG_getRandomBits(RNG_Handle handle,
void *randomBits,
size_t randomBitsLength);
681 const void *lowerLimit,
682 const void *upperLimit,
684 size_t randomNumberBitLength);
740 const void *lowerLimit,
741 const void *upperLimit,
743 size_t randomNumberBitLength);
829 const void *lowerLimit,
830 const void *upperLimit,
832 size_t randomNumberBitLength);
885 const void *lowerLimit,
886 const void *upperLimit,
888 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:472
int_fast16_t RNG_init(void)
This function initializes the RNG module.
RNG_RandomBitsCallbackFxn randomBitsCallbackFxn
Definition: RNG.h:477
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:363
CryptoKey datastructure.
Definition: CryptoKey.h:196
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:398
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:473
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:453
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:366
uint32_t timeout
Definition: RNG.h:482
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:470
RNG Global configuration.
Definition: RNG.h:360
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:372
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:433