Mineserver
A rewrite of Minecraft 1.8.9 in C++ !
Loading...
Searching...
No Matches
EncryptionResponse Class Reference

Encryption Response Packet. More...

#include <encryptionexchange.h>

Inheritance diagram for EncryptionResponse:
IPacket

Public Member Functions

 EncryptionResponse ()
 Construct a new Encryption Response object.
 
 ~EncryptionResponse () override=default
 Destroy the Encryption Response object.
 
void read (IMCStream *stream) override
 Reads the packet from the stream.
 
- Public Member Functions inherited from IPacket
virtual ~IPacket ()=default
 Destroy the IPacket object.
 
void send (IMCStream *stream)
 Sends a Packet in Minecraft format.
 

Public Attributes

size_t sharedSecretLength {}
 The length of the shared secret.
 
std::unique_ptr< std::byte[]> sharedSecret
 The shared secret between the two clients.
 
size_t verifyTokenLength {}
 The length of the verify token.
 
std::unique_ptr< std::byte[]> verifyToken
 The verify token.
 
- Public Attributes inherited from IPacket
int id
 Packet Id.
 

Additional Inherited Members

- Protected Member Functions inherited from IPacket
 IPacket (int id)
 Construct a new IPacket object.
 

Detailed Description

Encryption Response Packet.

Used to verify the verify token as well as encrypting the channel with the shared secret.

It is not exposed to lua for security reasons. A plugin should not handle encryption and stuff.

Member Function Documentation

◆ read()

void EncryptionResponse::read ( IMCStream * stream)
overridevirtual

Reads the packet from the stream.

Parameters
streamthe stream to read from

Implements IPacket.

Member Data Documentation

◆ sharedSecret

std::unique_ptr<std::byte[]> EncryptionResponse::sharedSecret

The shared secret between the two clients.

Already decrypted when reading it from the stream.

◆ verifyToken

std::unique_ptr<std::byte[]> EncryptionResponse::verifyToken

The verify token.

Already decrypted as well when reading it from the stream.


The documentation for this class was generated from the following files: