fix initialisation of entropy pool

have to know home dir before loading entropy.dat

add dummy screenshots on keypress events during first run to get entropy
This commit is contained in:
ac-stef
2017-05-13 20:02:18 +02:00
parent cf55e54faa
commit 458b911ecd
2 changed files with 12 additions and 2 deletions
+8
View File
@@ -366,6 +366,14 @@ void entropy_init(uint seed)
int len = 0;
char *buf = loadfile(ENTROPYSAVEFILE, &len);
if(buf && len) entropy_add_block((uchar*)buf, len);
#ifndef STANDALONE
else
{
extern int bootstrapentropy;
bootstrapentropy += 7 + rnd(13);
clientlogf(ENTROPYSAVEFILE " not found.");
}
#endif
DELETEA(buf);
entropy_get((uchar*)mt_state, MT_N * sizeof(uint));
}