implement Decrypt for all local destination

This commit is contained in:
orignal 2017-11-08 13:49:48 -05:00
parent 60aa459dfc
commit c5f784719d
8 changed files with 44 additions and 6 deletions

View file

@ -28,6 +28,7 @@ namespace i2p
m_StartupTime = i2p::util::GetSecondsSinceEpoch ();
if (!Load ())
CreateNewRouter ();
m_Decryptor = m_Keys.CreateDecryptor (nullptr);
UpdateRouterInfo ();
}
@ -478,4 +479,10 @@ namespace i2p
{
return i2p::util::GetSecondsSinceEpoch () - m_StartupTime;
}
void RouterContext::Decrypt (const uint8_t * encrypted, uint8_t * data, BN_CTX * ctx) const
{
if (m_Decryptor)
m_Decryptor->Decrypt (encrypted, data, ctx);
}
}