UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
EncryptionComponent.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "PacketHandler.h"
8#include "UObject/CoreNet.h"
9
14{
15public:
19 explicit FEncryptionComponent(FName InName) : HandlerComponent(InName) {}
20
24 virtual void EnableEncryption() = 0;
25
29 virtual void DisableEncryption() = 0;
30
34 virtual bool IsEncryptionEnabled() const = 0;
35
40 UE_DEPRECATED(4.24, "Use SetEncryptionData instead")
42 {
43 FEncryptionData EncryptionData;
44 EncryptionData.Key.Append(Key.GetData(), Key.Num());
45 SetEncryptionData(EncryptionData);
46 }
47
51 virtual void SetEncryptionData(const FEncryptionData& EncryptionData) = 0;
52};
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition EncryptionComponent.h:14
virtual bool IsEncryptionEnabled() const =0
virtual void SetEncryptionKey(TArrayView< const uint8 > Key)
Definition EncryptionComponent.h:41
FEncryptionComponent(FName InName)
Definition EncryptionComponent.h:19
virtual void EnableEncryption()=0
virtual void SetEncryptionData(const FEncryptionData &EncryptionData)=0
virtual void DisableEncryption()=0
Definition NameTypes.h:617
Definition PacketHandler.h:728
Definition ArrayView.h:139
void Append(const TArray< OtherElementType, OtherAllocatorType > &Source)
Definition Array.h:2412
Definition CoreNet.h:739
TArray< uint8 > Key
Definition CoreNet.h:741