diff options
| author | Savander <savander.pl@gmail.com> | 2018-09-28 17:44:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-09-28 17:44:19 +0200 |
| commit | 012cda5afd013e27e529026b67722609ecd61d41 (patch) | |
| tree | a5c3789c4aa2c93255d824b5eb343172d3642eac /src/base/system.h | |
| parent | fc6d8b4d154049e6e3d6df9039669580f8ff747c (diff) | |
| parent | 2cd0223a8df54ae1c8715915a331dfc56a5a29d3 (diff) | |
| download | zcatch-012cda5afd013e27e529026b67722609ecd61d41.tar.gz zcatch-012cda5afd013e27e529026b67722609ecd61d41.zip | |
Merge pull request #4 from Learath2/zcatchspoof
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 |