SU3 resseed first

This commit is contained in:
orignal 2014-12-11 21:14:04 -05:00
parent 9ce56eb95f
commit 6ac846f95d
3 changed files with 18 additions and 5 deletions

View file

@ -2,6 +2,7 @@
#include <sstream>
#include <boost/regex.hpp>
#include <boost/filesystem.hpp>
#include <cryptopp/osrng.h>
#include <cryptopp/zinflate.h>
#include "I2PEndian.h"
#include "Reseed.h"
@ -125,7 +126,9 @@ namespace data
int Reseeder::ReseedNowSU3 ()
{
std::string reseedHost = httpReseedHostList[(rand() % httpReseedHostList.size())];
CryptoPP::AutoSeededRandomPool rnd;
auto ind = rnd.GenerateWord32 (0, httpReseedHostList.size() - 1);
std::string reseedHost = httpReseedHostList[ind];
return ReseedFromSU3 (reseedHost);
}