MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ReceiveEnableEncryption

Method ReceiveEnableEncryption

src/network/network_crypto.cpp:263–266  ·  view source on GitHub ↗

* Receive the initial nonce for the encrypted connection. * @param p The packet to read the data from. * @return \c true when enough bytes could be read for the nonce, otherwise \c false. */

Source from the content-addressed store, hash-verified

261 * @return \c true when enough bytes could be read for the nonce, otherwise \c false.
262 */
263bool X25519AuthenticationHandler::ReceiveEnableEncryption(struct Packet &p)
264{
265 return p.Recv_bytes(this->encryption_nonce) == this->encryption_nonce.size();
266}
267
268std::unique_ptr<NetworkEncryptionHandler> X25519AuthenticationHandler::CreateClientToServerEncryptionHandler() const
269{

Calls 2

Recv_bytesMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected