mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-19 22:01:49 +02:00
generic encryption for RoutingDestination
This commit is contained in:
parent
9fa67b0e0a
commit
81658d2ff9
8 changed files with 83 additions and 40 deletions
libi2pd
|
@ -208,6 +208,13 @@ namespace data
|
|||
return ts > m_ExpirationTime;
|
||||
}
|
||||
|
||||
void LeaseSet::Encrypt (const uint8_t * data, uint8_t * encrypted, BN_CTX * ctx)
|
||||
{
|
||||
auto encryptor = m_Identity->CreateEncryptor (m_EncryptionKey);
|
||||
if (encryptor)
|
||||
encryptor->Encrypt (data, encrypted, ctx);
|
||||
}
|
||||
|
||||
LocalLeaseSet::LocalLeaseSet (std::shared_ptr<const IdentityEx> identity, const uint8_t * encryptionPublicKey, std::vector<std::shared_ptr<i2p::tunnel::InboundTunnel> > tunnels):
|
||||
m_ExpirationTime (0), m_Identity (identity)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue