mirror of
https://github.com/zeromq/libzmq.git
synced 2025-01-08 11:02:22 +01:00
d1881acbdc
When Curve authentication is used, libsodium opens a file descriptor to /dev/urandom to generate random bytes. When the ZMQ context terminates, it should ensure that file gets closed.
26 lines
412 B
C
26 lines
412 B
C
/*
|
|
randombytes/devurandom.h version 20080713
|
|
D. J. Bernstein
|
|
Public domain.
|
|
*/
|
|
|
|
#ifndef randombytes_devurandom_H
|
|
#define randombytes_devurandom_H
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
extern void randombytes(unsigned char *,unsigned long long);
|
|
extern int randombytes_close(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#ifndef randombytes_implementation
|
|
#define randombytes_implementation "devurandom"
|
|
#endif
|
|
|
|
#endif
|