diff options
| author | eeeee <eeeee@qwe123.info> | 2018-08-18 17:33:58 -0700 |
|---|---|---|
| committer | Learath <learath2@gmail.com> | 2018-08-20 15:33:34 +0300 |
| commit | 2cd0223a8df54ae1c8715915a331dfc56a5a29d3 (patch) | |
| tree | a5c3789c4aa2c93255d824b5eb343172d3642eac /src/base/system.h | |
| parent | 3f3abebebf20e8901376b929e2afcc6bdb404a3b (diff) | |
| download | zcatch-2cd0223a8df54ae1c8715915a331dfc56a5a29d3.tar.gz zcatch-2cd0223a8df54ae1c8715915a331dfc56a5a29d3.zip | |
Port antispoof
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 |