diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-06-04 13:22:56 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-06-04 13:22:56 +0200 |
commit | 85726b6a6d53f6c3a2c18ba3412ee5b14ee4d6f3 (patch) | |
tree | 4a76b6b0e85127135eaa30e6478cfdc18847702a /rnd.h | |
parent | 26b173d328e36e423ff7765df5b3fc75abb6a1d9 (diff) |
rnd: add gen_key_bytes to generate key from good entropy source
Make this a function and do not have this in curvetun hard coded.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'rnd.h')
-rw-r--r-- | rnd.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4,10 +4,11 @@ #define HIG_ENTROPY_SOURCE "/dev/random" #define LOW_ENTROPY_SOURCE "/dev/urandom" -/* Note: it's not really secure, but the name only suggests it's better to use +/* secrand is not really secure, but the name only suggests it's better to use * than rand(3) when transferring bytes over the network in non-security * critical structure members. secrand() is only used to fill up salts actually. */ extern int secrand(void); +extern void gen_key_bytes(unsigned char *area, size_t len); #endif /* RND_H */ |