Mercurial > dropbear
comparison dbrandom.c @ 1278:0c47d97aa9d5
merge
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 16 Mar 2016 22:53:27 +0800 |
parents | 9da3e7b4fe55 |
children | 750ec4ec4cbe b28624698130 |
comparison
equal
deleted
inserted
replaced
1264:a20b6af6f182 | 1278:0c47d97aa9d5 |
---|---|
30 | 30 |
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 static uint32_t counter = 0; | 33 static uint32_t counter = 0; |
34 /* the max value for the counter, so it won't integer overflow */ | 34 /* the max value for the counter, so it won't integer overflow */ |
35 #define MAX_COUNTER 1<<30 | 35 #define MAX_COUNTER (1<<30) |
36 | 36 |
37 static unsigned char hashpool[SHA1_HASH_SIZE] = {0}; | 37 static unsigned char hashpool[SHA1_HASH_SIZE] = {0}; |
38 static int donerandinit = 0; | 38 static int donerandinit = 0; |
39 | 39 |
40 #define INIT_SEED_SIZE 32 /* 256 bits */ | 40 #define INIT_SEED_SIZE 32 /* 256 bits */ |