mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
SU3 resseed first
This commit is contained in:
parent
9ce56eb95f
commit
6ac846f95d
3 changed files with 18 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue