diff random.h @ 687:167fdc091c05

Improve RNG seeding. Try to read from /dev/urandom multiple times, take input from extra sources, and use /dev/random when generating private keys
author Matt Johnston <matt@ucc.asn.au>
date Fri, 29 Jun 2012 23:19:43 +0800
parents 2cd2edfa11ee
children c3de235d9506
line wrap: on
line diff
--- a/random.h	Thu May 17 00:26:12 2012 +0800
+++ b/random.h	Fri Jun 29 23:19:43 2012 +0800
@@ -27,10 +27,10 @@
 
 struct mp_int;
 
+void seedstrongrandom();
 void seedrandom();
-void reseedrandom();
-void genrandom(unsigned char* buf, int len);
-void addrandom(unsigned char* buf, int len);
+void genrandom(unsigned char* buf, unsigned int len);
+void addrandom(char * buf, unsigned int len);
 void gen_random_mpint(mp_int *max, mp_int *rand);
 
 #endif /* _RANDOM_H_ */