diff options
-rw-r--r-- | main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -426,6 +426,7 @@ hexdump(byte *input, int len) { static struct {
byte seed_sequence[4]; /* sequence number in PRNG sequence */
byte seed_random[RMDbytes]; /* 160 bits collected at start */
+ byte seed_previous[RMDbytes]; /* 160 bits from previous iteration */
byte seed_owner[RMDbytes]; /* 160 bit hash of owner ident */
} seed;
@@ -638,6 +639,10 @@ main (int argc, char *argv[]) seed.seed_sequence[2] = (seqno>>16) & 0xFF;
seed.seed_sequence[3] = (seqno>>24) & 0xFF;
/*
+ * Seed the next iteration with the current output
+ */
+ memcpy(seed.seed_previous, hashcode, RMDbytes);
+ /*
* Run all the bits through the hash
*/
hashcode = RMDhash((byte *) &seed, sizeof(seed));
|