engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
RSAKeyAESEncryptionHandlerComponent类 参考

Exchanges a key using RSA as the handshake, and implements symmetric encryption with that key using AES 更多...

#include <RSAKeyAESEncryptionHandlerComponent.h>

+ 类 RSAKeyAESEncryptionHandlerComponent 继承关系图:

Public 成员函数

virtual int32 GetReservedPacketBits () const override
 Returns the amount of reserved packet/protocol bits expected from this component. 更多...
 
virtual void Incoming (FBitReader &Packet) override
 Handles incoming packets 更多...
 
virtual void Initialize () override
 Initialization functionality should be placed here
 
virtual bool IsValid () const override
 Return whether this handler is valid
 
virtual void NotifyHandshakeBegin () override
 Notification to this component that it is ready to begin handshaking
 
 RSAKeyAESEncryptionHandlerComponent (uint32 InAsymmetricKeySize=2048, uint32 InSessionKeySize=256)
 Initializes default data, can specify key size in bits, increasing the key size will increase the fixed cipher text and max plain text sizes 更多...
 
- Public 成员函数 继承自 HandlerComponent
virtual bool CanReadUnaligned () const
 Whether or not the Incoming/IncomingConnectionless implementations, support reading Packets that aren't aligned at bit position 0 (i.e. 更多...
 
FName GetName () const
 Returns the name of this component.
 
virtual int32 GetReservedPacketBits () const =0
 Returns the amount of reserved packet/protocol bits expected from this component. 更多...
 
 HandlerComponent ()
 Base constructor
 
 HandlerComponent (FName InName)
 Constructor that accepts a name
 
virtual void Incoming (FBitReader &Packet)
 Handles incoming packets 更多...
 
virtual void IncomingConnectionless (FIncomingPacketRef PacketRef)
 Handles incoming packets not associated with a UNetConnection 更多...
 
virtual void Initialize ()=0
 Initialization functionality should be placed here
 
virtual bool IsActive () const
 Returns whether this handler is currently active
 
bool IsInitialized () const
 Returns whether this handler is initialized
 
virtual bool IsValid () const =0
 Return whether this handler is valid
 
virtual void NotifyAnalyticsProvider ()
 Notification that the analytics provider has been updated NOTE: Can also mean disabled, e.g. 更多...
 
virtual void NotifyHandshakeBegin ()
 Notification to this component that it is ready to begin handshaking
 
virtual void Outgoing (FBitWriter &Packet, FOutPacketTraits &Traits)
 Handles any outgoing packets 更多...
 
virtual void OutgoingConnectionless (const TSharedPtr< const FInternetAddr > &Address, FBitWriter &Packet, FOutPacketTraits &Traits)
 Handles any outgoing packets not associated with a UNetConnection 更多...
 
bool RequiresHandshake () const
 Returns whether this handler perform a network handshake during initialization
 
bool RequiresReliability () const
 Returns whether this handler perform a network handshake during initialization
 
virtual void SetActive (bool Active)
 Sets whether this handler is currently active 更多...
 
virtual void Tick (float DeltaTime)
 Tick functionality should be placed here
 
virtual ~HandlerComponent ()
 Base destructor
 

Protected 成员函数

void IncomingHandshake (FBitReader &Packet)
 Processes an incoming packet during the handshake stage.
 
- Protected 成员函数 继承自 HandlerComponent
void Initialized ()
 Should be called when the handler is fully initialized on both remote and local
 
void SetState (Handler::Component::State State)
 Sets the state of the handler 更多...
 

Protected 属性

uint32 AsymmetricKeyFixedCiphertextLength
 Fixed cipher text length that will result of private asymmetric key encryption
 
uint32 AsymmetricKeyMaxPlaintextLength
 Maximum plain text length that can be encrypted with private asymmetric key
 
uint32 AsymmetricKeySize
 Size of the asymmetric key in bits
 
TArray< uint8 > SessionKey
 The session key
 
uint32 SessionKeySize
 Size of the symmetric session key in bits
 
CryptoPP::CBC_CTS_Mode< CryptoPP::AES >::Decryption SymmetricDecrypt
 Decryptor for encrypting with the symmetric session key
 
CryptoPP::CBC_CTS_Mode< CryptoPP::AES >::Encryption SymmetricEncrypt
 Encryptor for encrypting with the symmetric session key
 
- Protected 属性 继承自 HandlerComponent
bool bRequiresHandshake
 Whether this handler has to perform a network handshake during initialization (requires waiting on other HandlerComponent's)
 
bool bRequiresReliability
 Whether this handler depends upon the ReliabilityHandlerComponent being enabled
 
uint32 MaxOutgoingBits
 Maximum number of Outgoing packet bits supported (automatically calculated to factor in other HandlerComponent reserved bits)
 
Handler::Component::State State
 The state of this handler
 

额外继承的成员函数

- Public 属性 继承自 HandlerComponent
PacketHandler * Handler
 The manager of the handler, set in initialization
 

详细描述

Exchanges a key using RSA as the handshake, and implements symmetric encryption with that key using AES

构造及析构函数说明

◆ RSAKeyAESEncryptionHandlerComponent()

RSAKeyAESEncryptionHandlerComponent::RSAKeyAESEncryptionHandlerComponent ( uint32  InAsymmetricKeySize = 2048,
uint32  InSessionKeySize = 256 
)

Initializes default data, can specify key size in bits, increasing the key size will increase the fixed cipher text and max plain text sizes

参数
InAsymmetricKeySizeThe size to use for the asymmetric/RSA key
InSessionKeySizeThe size to use for the symmetric session key

成员函数说明

◆ GetReservedPacketBits()

virtual int32 RSAKeyAESEncryptionHandlerComponent::GetReservedPacketBits ( ) const
overridevirtual

Returns the amount of reserved packet/protocol bits expected from this component.

IMPORTANT: This MUST be accurate, and should represent the worst-case number of reserved bits expected from the component. If this is inaccurate, packets will randomly fail to send, in rare cases which are extremely hard to trace.

返回
The worst-case reserved packet bits for the component

实现了 HandlerComponent.

◆ Incoming()

virtual void RSAKeyAESEncryptionHandlerComponent::Incoming ( FBitReader &  Packet)
overridevirtual

Handles incoming packets

参数
PacketThe packet to be handled

重载 HandlerComponent .


该类的文档由以下文件生成: