mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Mention what is optional and what is required for a randombytes implementation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user