SmartSnippets DA1459x SDK
sys_drbg.h
Go to the documentation of this file.
1 
45 #ifndef SYS_DRBG_H_
46 #define SYS_DRBG_H_
47 
48 
49 #if dg_configUSE_SYS_DRBG
50 
51 #include "sdk_defs.h"
52 
53 /*
54  * TYPE DEFINITIONS
55  *****************************************************************************************
56  */
57 
61 typedef enum {
65 
66 /*
67  * FUNCTION DECLARATIONS
68  *****************************************************************************************
69  */
70 
71 #if (dg_configUSE_SYS_TRNG == 0)
72 
77 bool sys_drbg_can_run(void);
78 #endif /* dg_configUSE_SYS_TRNG */
79 
83 void sys_drbg_srand(void);
84 
85 #if defined(OS_PRESENT)
86 
91 void sys_drbg_create_os_objects(void);
92 #endif /* OS_PRESENT */
93 
97 void sys_drbg_init(void);
98 
109 SYS_DRBG_ERROR sys_drbg_read_rand(uint32_t *rand_number);
110 
111 #if !defined(OS_PRESENT)
112 
115 void sys_drbg_update(void);
116 #endif /* OS_PRESENT */
117 
123 uint32_t sys_drbg_read_index(void);
124 
133 uint32_t sys_drbg_read_threshold(void);
134 
140 uint8_t sys_drbg_read_request(void);
141 
142 #endif /* dg_configUSE_SYS_DRBG */
143 
144 
145 #endif /* SYS_DRBG_H_ */
146 
sys_drbg_read_rand
SYS_DRBG_ERROR sys_drbg_read_rand(uint32_t *rand_number)
Reads a random number from the buffer which holds the random numbers.
sdk_defs.h
Central include header file with platform definitions.
sys_drbg_read_request
uint8_t sys_drbg_read_request(void)
Reads the request value.
sys_drbg_init
void sys_drbg_init(void)
Initializes the DRBG data structure.
sys_drbg_read_index
uint32_t sys_drbg_read_index(void)
Reads the current index value of the buffer.
SYS_DRBG_ERROR_NONE
Definition: sys_drbg.h:62
sys_drbg_update
void sys_drbg_update(void)
Updates the DRBG data structure.
SYS_DRBG_ERROR
SYS_DRBG_ERROR
sys drbg errors
Definition: sys_drbg.h:61
SYS_DRBG_ERROR_BUFFER_EXHAUSTED
Definition: sys_drbg.h:63
sys_drbg_read_threshold
uint32_t sys_drbg_read_threshold(void)
Reads the threshold level value.
sys_drbg_srand
void sys_drbg_srand(void)
Set the seed for the random number generator function.