MCPcopy Create free account
hub / github.com/PurpleI2P/i2pd / WrapSingleMessage

Method WrapSingleMessage

libi2pd/ECIESX25519AEADRatchetSession.cpp:1007–1016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1005 }
1006
1007 std::shared_ptr<I2NPMessage> ECIESX25519AEADRatchetSession::WrapSingleMessage (std::shared_ptr<const I2NPMessage> msg)
1008 {
1009 auto owner = GetOwner();
1010 if (!owner) return nullptr;
1011 uint8_t * payload = owner->GetPayloadBuffer ();
1012 if (!payload) return nullptr;
1013 size_t len = CreatePayload (msg, m_State != eSessionStateEstablished, payload);
1014 if (!len) return nullptr;
1015 return WrapPayload (payload, len);
1016 }
1017
1018 std::vector<std::shared_ptr<I2NPMessage> > ECIESX25519AEADRatchetSession::WrapMultipleMessages (const std::vector<std::shared_ptr<const I2NPMessage> >& msgs)
1019 {

Callers

nothing calls this directly

Calls 1

GetPayloadBufferMethod · 0.80

Tested by

no test coverage detected