Mercurial > dropbear
comparison random.c @ 205:3924393e2456
merge of 7d53fee744460df7d2297614c9a4a8a6722eb277
and cc783df3845d0779e2407f0a83fbb605c12efa7d
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Fri, 27 May 2005 16:37:58 +0000 |
parents | 65585699d980 |
children | ca7e76d981d9 3be7ae2e8dfa |
comparison
equal
deleted
inserted
replaced
204:675f7bf3c391 | 205:3924393e2456 |
---|---|
25 #include "includes.h" | 25 #include "includes.h" |
26 #include "buffer.h" | 26 #include "buffer.h" |
27 #include "dbutil.h" | 27 #include "dbutil.h" |
28 #include "bignum.h" | 28 #include "bignum.h" |
29 | 29 |
30 int donerandinit = 0; | 30 static int donerandinit = 0; |
31 | 31 |
32 /* this is used to generate unique output from the same hashpool */ | 32 /* this is used to generate unique output from the same hashpool */ |
33 unsigned int counter = 0; | 33 static unsigned int counter = 0; |
34 #define MAX_COUNTER 1000000/* the max value for the counter, so it won't loop */ | 34 #define MAX_COUNTER 1000000/* the max value for the counter, so it won't loop */ |
35 | 35 |
36 unsigned char hashpool[SHA1_HASH_SIZE]; | 36 static unsigned char hashpool[SHA1_HASH_SIZE]; |
37 | 37 |
38 #define INIT_SEED_SIZE 32 /* 256 bits */ | 38 #define INIT_SEED_SIZE 32 /* 256 bits */ |
39 | 39 |
40 static void readrand(unsigned char* buf, unsigned int buflen); | 40 static void readrand(unsigned char* buf, unsigned int buflen); |
41 | 41 |