Added the capability for custom encryption's to be added to EHC.
This commit is contained in:
43
include/ehs/io/socket/ehc/NetEnc.h
Normal file
43
include/ehs/io/socket/ehc/NetEnc.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "ehs/Str.h"
|
||||
|
||||
namespace ehs
|
||||
{
|
||||
class EHC;
|
||||
|
||||
class NetEnc
|
||||
{
|
||||
private:
|
||||
friend class EHC;
|
||||
|
||||
EHC *owner;
|
||||
UInt_64 hashId;
|
||||
Str_8 id;
|
||||
|
||||
public:
|
||||
virtual ~NetEnc() = default;
|
||||
|
||||
NetEnc();
|
||||
|
||||
NetEnc(Str_8 id);
|
||||
|
||||
NetEnc(NetEnc &&enc) noexcept;
|
||||
|
||||
NetEnc(const NetEnc &enc);
|
||||
|
||||
NetEnc &operator=(NetEnc &&enc) noexcept;
|
||||
|
||||
NetEnc &operator=(const NetEnc &enc);
|
||||
|
||||
EHC *GetOwner() const;
|
||||
|
||||
UInt_64 GetHashId() const;
|
||||
|
||||
Str_8 GetId() const;
|
||||
|
||||
virtual void Encrypt(Byte *data, UInt_64 size) const;
|
||||
|
||||
virtual void Decrypt(Byte *data, UInt_64 size) const;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user