mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-20 02:25:14 -07:00
Mention what is optional and what is required for a randombytes implementation
This commit is contained in:
parent
0b4fb379d4
commit
5b3d8a4bf9
@ -17,12 +17,12 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct randombytes_implementation {
|
typedef struct randombytes_implementation {
|
||||||
const char *(*implementation_name)(void);
|
const char *(*implementation_name)(void); /* required */
|
||||||
uint32_t (*random)(void);
|
uint32_t (*random)(void); /* required */
|
||||||
void (*stir)(void);
|
void (*stir)(void); /* optional */
|
||||||
uint32_t (*uniform)(const uint32_t upper_bound);
|
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);
|
void (*buf)(void * const buf, const size_t size); /* required */
|
||||||
int (*close)(void);
|
int (*close)(void); /* optional */
|
||||||
} randombytes_implementation;
|
} randombytes_implementation;
|
||||||
|
|
||||||
SODIUM_EXPORT
|
SODIUM_EXPORT
|
||||||
|
Loading…
Reference in New Issue
Block a user