1
0
mirror of https://github.com/PurpleI2P/i2pd-tools synced 2025-01-15 09:10:01 +00:00

updated to 2.51.0

This commit is contained in:
orignal 2024-05-07 18:13:03 -04:00
parent cf0c9c9d74
commit d7a079ad64
10 changed files with 17 additions and 12 deletions

View File

@ -197,7 +197,7 @@ int main(int argc, char * argv[])
return 0; return 0;
} }
InitCrypto(false, true, true, false); InitCrypto(false, true, false);
if(!fam.size()) { if(!fam.size()) {
// no family name // no family name
@ -319,7 +319,10 @@ int main(int argc, char * argv[])
delete [] k; delete [] k;
} }
LocalRouterInfo ri(infofile); RouterInfo routerInfo(infofile);
LocalRouterInfo ri;
ri.Update (routerInfo.GetBuffer (), routerInfo.GetBufferLen ());
auto ident = ri.GetIdentHash(); auto ident = ri.GetIdentHash();
@ -365,7 +368,9 @@ int main(int argc, char * argv[])
if (verbose) std::cout << "load " << infofile << std::endl; if (verbose) std::cout << "load " << infofile << std::endl;
LocalRouterInfo ri(infofile); RouterInfo routerInfo(infofile);
LocalRouterInfo ri;
ri.Update (routerInfo.GetBuffer (), routerInfo.GetBufferLen ());
auto sig = ri.GetProperty(ROUTER_INFO_PROPERTY_FAMILY_SIG); auto sig = ri.GetProperty(ROUTER_INFO_PROPERTY_FAMILY_SIG);
if (ri.GetProperty(ROUTER_INFO_PROPERTY_FAMILY) != fam) { if (ri.GetProperty(ROUTER_INFO_PROPERTY_FAMILY) != fam) {
std::cout << infofile << " does not belong to " << fam << std::endl; std::cout << infofile << " does not belong to " << fam << std::endl;

2
i2pd

@ -1 +1 @@
Subproject commit a6bd8275ca496c75c84d7eb890c0071569d28f55 Subproject commit c98926abf2dcd3cbe2cbbfc00a9e9159240c3df9

View File

@ -12,7 +12,7 @@ int main (int argc, char * argv[])
std::cout << "Usage: keygen filename <signature type>" << std::endl; std::cout << "Usage: keygen filename <signature type>" << std::endl;
return -1; return -1;
} }
i2p::crypto::InitCrypto (false, true, true, false); i2p::crypto::InitCrypto (false, true, false);
i2p::data::SigningKeyType type = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519; i2p::data::SigningKeyType type = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
if (argc > 2) { if (argc > 2) {
std::string str(argv[2]); std::string str(argv[2]);

View File

@ -14,7 +14,7 @@ int main (int argc, char * argv[])
std::cout << "Usage: offlinekeys <output file> <keys file> <signature type> <days>" << std::endl; std::cout << "Usage: offlinekeys <output file> <keys file> <signature type> <days>" << std::endl;
return -1; return -1;
} }
i2p::crypto::InitCrypto (false, true, true, false); i2p::crypto::InitCrypto (false, true, false);
std::string fname(argv[2]); std::string fname(argv[2]);
i2p::data::PrivateKeys keys; i2p::data::PrivateKeys keys;

View File

@ -12,7 +12,7 @@ int main (int argc, char * argv[])
return -1; return -1;
} }
i2p::crypto::InitCrypto (false, true, true, false); i2p::crypto::InitCrypto (false, true, false);
i2p::data::PrivateKeys keys; i2p::data::PrivateKeys keys;
std::ifstream s(argv[1], std::ifstream::binary); std::ifstream s(argv[1], std::ifstream::binary);

View File

@ -18,7 +18,7 @@ int main (int argc, char * argv[])
if (argc < 3) { help(); return -1;} if (argc < 3) { help(); return -1;}
std::string arg = argv[1]; std::string arg = argv[1];
i2p::crypto::InitCrypto (false, true, true, false); i2p::crypto::InitCrypto (false, true, false);
i2p::data::PrivateKeys keys; i2p::data::PrivateKeys keys;
if (arg == "step1") { if (arg == "step1") {

View File

@ -12,7 +12,7 @@ int main (int argc, char * argv[])
return -1; return -1;
} }
i2p::crypto::InitCrypto (false, true, true, false); i2p::crypto::InitCrypto (false, true, false);
i2p::data::PrivateKeys oldkeys, newkeys; i2p::data::PrivateKeys oldkeys, newkeys;
{ {

View File

@ -46,7 +46,7 @@ int main(int argc, char * argv[])
usage(argv[0]); usage(argv[0]);
return 1; return 1;
} }
i2p::crypto::InitCrypto(false, true, true, false); i2p::crypto::InitCrypto(false, true, false);
int opt; int opt;
bool ipv6 = false; bool ipv6 = false;
bool firewall = false; bool firewall = false;

View File

@ -296,7 +296,7 @@ int main (int argc, char * argv[])
//// init and terminate //// init and terminate
// void InitCrypto (bool precomputation, bool aesni, bool avx, bool force); // void InitCrypto (bool precomputation, bool aesni, bool avx, bool force);
// By default false to all. But on much proccessors some things will be enabled. SO, TODO // By default false to all. But on much proccessors some things will be enabled. SO, TODO
i2p::crypto::InitCrypto (PRECOMPUTATION_CRYPTO, AESNI_CRYPTO, AVX_CRYPTO, FORCE_CRYPTO); i2p::crypto::InitCrypto (PRECOMPUTATION_CRYPTO, AESNI_CRYPTO, FORCE_CRYPTO);
options.signature = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519; options.signature = i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;
/////////////// ///////////////
//For while //For while

View File

@ -12,7 +12,7 @@ int main (int argc, char * argv[])
return -1; return -1;
} }
i2p::crypto::InitCrypto (false, true, true, false); i2p::crypto::InitCrypto (false, true, false);
i2p::data::IdentityEx Identity, OldIdentity; i2p::data::IdentityEx Identity, OldIdentity;