| 743 | } |
| 744 | |
| 745 | std::shared_ptr<I2NPMessage> GarlicDestination::WrapMessageForRouter (std::shared_ptr<const i2p::data::RouterInfo> router, |
| 746 | std::shared_ptr<I2NPMessage> msg) |
| 747 | { |
| 748 | if (router->GetEncryptionType () == i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD) |
| 749 | return WrapECIESX25519MessageForRouter (msg, router->GetIdentity ()->GetEncryptionPublicKey ()); |
| 750 | else |
| 751 | { |
| 752 | auto session = GetRoutingSession (router, false); |
| 753 | return session->WrapSingleMessage (msg); |
| 754 | } |
| 755 | } |
| 756 | |
| 757 | std::shared_ptr<GarlicRoutingSession> GarlicDestination::GetRoutingSession ( |
| 758 | std::shared_ptr<const i2p::data::RoutingDestination> destination, bool attachLeaseSet, |
nothing calls this directly
no test coverage detected