Mercurial > dropbear
comparison random.h @ 272:3be7ae2e8dfa
Only read /dev/random once when the program starts
rather than for every connection, to "conserve entropy".
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Sat, 11 Feb 2006 15:15:37 +0000 |
parents | c9483550701b |
children | d82a2a44c684 |
comparison
equal
deleted
inserted
replaced
271:be18c7dd486e | 272:3be7ae2e8dfa |
---|---|
26 #define _RANDOM_H_ | 26 #define _RANDOM_H_ |
27 | 27 |
28 struct mp_int; | 28 struct mp_int; |
29 | 29 |
30 void seedrandom(); | 30 void seedrandom(); |
31 void reseedrandom(); | |
31 void genrandom(unsigned char* buf, int len); | 32 void genrandom(unsigned char* buf, int len); |
32 void addrandom(unsigned char* buf, int len); | 33 void addrandom(unsigned char* buf, int len); |
33 void gen_random_mpint(mp_int *max, mp_int *rand); | 34 void gen_random_mpint(mp_int *max, mp_int *rand); |
34 | 35 |
35 #endif /* _RANDOM_H_ */ | 36 #endif /* _RANDOM_H_ */ |