Mercurial > dropbear
comparison random.c @ 198:65585699d980
* add a "label" argument to printhex()
* make some vars static in random.c
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 10 May 2005 17:02:05 +0000 |
parents | 06e326daf16a |
children | ca7e76d981d9 3be7ae2e8dfa |
comparison
equal
deleted
inserted
replaced
197:a6eb598d8686 | 198:65585699d980 |
---|---|
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 |