moved DHKeysPair to Transport

This commit is contained in:
orignal 2014-10-20 15:19:56 -04:00
parent 8e8eb3b588
commit a8871d9f98
6 changed files with 41 additions and 40 deletions

View file

@ -2,7 +2,6 @@
#include <stdio.h>
#include <cryptopp/sha.h>
#include <cryptopp/osrng.h>
#include <cryptopp/dh.h>
#include <cryptopp/dsa.h>
#include "base64.h"
#include "CryptoConst.h"
@ -293,14 +292,6 @@ namespace data
return keys;
}
void CreateRandomDHKeysPair (DHKeysPair * keys)
{
if (!keys) return;
CryptoPP::AutoSeededRandomPool rnd;
CryptoPP::DH dh (i2p::crypto::elgp, i2p::crypto::elgg);
dh.GenerateKeyPair(rnd, keys->privateKey, keys->publicKey);
}
IdentHash CreateRoutingKey (const IdentHash& ident)
{
uint8_t buf[41]; // ident + yyyymmdd