300 #ifndef ti_drivers_RNG__include 301 #define ti_drivers_RNG__include 325 #define RNG_STATUS_RESERVED (-32) 333 #define RNG_STATUS_SUCCESS ((int_fast16_t)0) 341 #define RNG_STATUS_ERROR ((int_fast16_t)-1) 352 #define RNG_STATUS_RESOURCE_UNAVAILABLE ((int_fast16_t)-2) 359 #define RNG_STATUS_INVALID_INPUTS ((int_fast16_t)-3) 364 #define RNG_STATUS_CANCELED ((int_fast16_t)-4) 371 #define RNG_ENTROPY_EXHAUSTED ((int_fast16_t)-5) 378 #define RNG_STATUS_INIT_NOT_ALLOWED ((int_fast16_t)-6) 386 #define RNG_STATUS_NOISE_INPUT_INVALID ((int_fast16_t)-7) 394 #define RNG_STATUS_NOT_INITIALIZED ((int_fast16_t)-7) 399 #define RNG_MAX_BIT_LENGTH ((size_t)1u << 20u) 506 int_fast16_t returnValue,
508 size_t randomBitsLength);
679 int_fast16_t
RNG_getRandomBits(RNG_Handle handle,
void *randomBits,
size_t randomBitsLength);
735 const void *lowerLimit,
736 const void *upperLimit,
738 size_t randomNumberBitLength);
794 const void *lowerLimit,
795 const void *upperLimit,
797 size_t randomNumberBitLength);
883 const void *lowerLimit,
884 const void *upperLimit,
886 size_t randomNumberBitLength);
939 const void *lowerLimit,
940 const void *upperLimit,
942 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:524
int_fast16_t RNG_init(void)
This function initializes the RNG module.
RNG_RandomBitsCallbackFxn randomBitsCallbackFxn
Definition: RNG.h:529
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:415
CryptoKey datastructure.
Definition: CryptoKey.h:208
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:450
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:525
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:505
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:418
uint32_t timeout
Definition: RNG.h:534
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:522
RNG Global configuration.
Definition: RNG.h:412
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:424
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:485