MCPcopy Create free account
hub / github.com/ReversecLabs/C3 / Create

Method Create

Src/Core/Procedures.h:136–141  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 2

CompileQueryHeaderMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected