diff options
Diffstat (limited to 'src/base/system.h')
| -rw-r--r-- | src/base/system.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/base/system.h b/src/base/system.h index ad606ceb..e23adf29 100644 --- a/src/base/system.h +++ b/src/base/system.h @@ -1297,6 +1297,27 @@ int str_utf8_encode(char *ptr, int chr); */ int str_utf8_check(const char *str); +/* + Function: secure_random_init + Initializes the secure random module. + You *MUST* check the return value of this function. + + Returns: + 0 - Initialization succeeded. + 1 - Initialization failed. +*/ +int secure_random_init(); + +/* + Function: secure_random_fill + Fills the buffer with the specified amount of random bytes. + + Parameters: + buffer - Pointer to the start of the buffer. + length - Length of the buffer. +*/ +void secure_random_fill(void *bytes, unsigned length); + #ifdef __cplusplus } #endif |