mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-28 11:47:48 +02:00
moved Noise initializations to Crypto.cpp
This commit is contained in:
parent
ce14ea6fe5
commit
32fc6482cc
8 changed files with 71 additions and 58 deletions
|
@ -19,7 +19,6 @@
|
|||
#include "version.h"
|
||||
#include "Log.h"
|
||||
#include "Family.h"
|
||||
#include "TunnelConfig.h"
|
||||
#include "RouterContext.h"
|
||||
|
||||
namespace i2p
|
||||
|
@ -45,8 +44,7 @@ namespace i2p
|
|||
if (IsECIES ())
|
||||
{
|
||||
auto initState = new i2p::crypto::NoiseSymmetricState ();
|
||||
i2p::tunnel::InitBuildRequestRecordNoiseState (*initState);
|
||||
initState->MixHash (GetIdentity ()->GetEncryptionPublicKey (), 32); // h = SHA256(h || hepk)
|
||||
i2p::crypto::InitNoiseNState (*initState, GetIdentity ()->GetEncryptionPublicKey ());
|
||||
m_InitialNoiseState.reset (initState);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue