From 2cd0223a8df54ae1c8715915a331dfc56a5a29d3 Mon Sep 17 00:00:00 2001 From: eeeee Date: Sat, 18 Aug 2018 17:33:58 -0700 Subject: Port antispoof --- src/base/system.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/base/system.h') 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 -- cgit 1.4.1