From 5b3d8a4bf95ecc2cec6c7e4f8c13e8d275548e00 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 18 Jan 2015 10:12:27 +0100 Subject: [PATCH] Mention what is optional and what is required for a randombytes implementation --- src/libsodium/include/sodium/randombytes.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libsodium/include/sodium/randombytes.h b/src/libsodium/include/sodium/randombytes.h index d92c1a4d..08aff052 100644 --- a/src/libsodium/include/sodium/randombytes.h +++ b/src/libsodium/include/sodium/randombytes.h @@ -17,12 +17,12 @@ extern "C" { #endif typedef struct randombytes_implementation { - const char *(*implementation_name)(void); - uint32_t (*random)(void); - void (*stir)(void); - uint32_t (*uniform)(const uint32_t upper_bound); - void (*buf)(void * const buf, const size_t size); - int (*close)(void); + const char *(*implementation_name)(void); /* required */ + uint32_t (*random)(void); /* required */ + void (*stir)(void); /* optional */ + uint32_t (*uniform)(const uint32_t upper_bound); /* optional, a default implementation will be used if NULL */ + void (*buf)(void * const buf, const size_t size); /* required */ + int (*close)(void); /* optional */ } randombytes_implementation; SODIUM_EXPORT