Create new instance. @param sendersRid RouteId created from relay AgentId, and grc DeviceId. @param buildId id of relay build. @param gatewayEncryptionKey key used to encrypt package. Only gateway will be able to decrypt package. @param agentsPublicEncryptionKey gateway will use this key to send encrypted messages to relay. @param grcHash hash identifying type of first interface. @param timestamp
| 134 | /// @param timestamp time of generating message. |
| 135 | /// @param responseType inform if recipient if response is required. |
| 136 | static std::unique_ptr<InitializeRouteQuery> Create(RouteId sendersRid, BuildId buildId, Crypto::PublicKey gatewayEncryptionKey, Crypto::PublicKey agentsPublicEncryptionKey, HashT grcHash, int32_t firstSeen, int32_t lastSeen, ResponseType responseType = ResponseType::None) |
| 137 | { |
| 138 | auto query = std::make_unique<InitializeRouteQuery>(sendersRid, responseType); |
| 139 | query->m_QueryPacketBody = Crypto::EncryptAnonymously(ByteVector::Create(buildId, agentsPublicEncryptionKey.ToByteVector(), grcHash, firstSeen, lastSeen, HostInfo::Gather()), gatewayEncryptionKey); |
| 140 | return query; |
| 141 | } |
| 142 | |
| 143 | private: |
| 144 | /// Inherit Constructors. |
nothing calls this directly
no test coverage detected