76 lines
1.1 KiB
C++
76 lines
1.1 KiB
C++
#include "ehs/io/socket/ehc/NetEnc.h"
|
|
|
|
namespace ehs
|
|
{
|
|
NetEnc::NetEnc()
|
|
: id(0)
|
|
{
|
|
}
|
|
|
|
NetEnc::NetEnc(Str_8 name, const Version &version)
|
|
: id(name.Hash_64()), name((Str_8 &&)name), version(version)
|
|
{
|
|
}
|
|
|
|
NetEnc::NetEnc(NetEnc&& enc) noexcept
|
|
: id(enc.id), name((Str_8 &&)enc.name), version(enc.version)
|
|
{
|
|
enc.id = 0;
|
|
enc.version = {};
|
|
}
|
|
|
|
NetEnc::NetEnc(const NetEnc& enc)
|
|
: id(enc.id), name(enc.name), version(enc.version)
|
|
{
|
|
}
|
|
|
|
NetEnc& NetEnc::operator=(NetEnc&& enc) noexcept
|
|
{
|
|
if (this == &enc)
|
|
return *this;
|
|
|
|
id = enc.id;
|
|
name = (Str_8 &&)enc.name;
|
|
version = enc.version;
|
|
|
|
enc.id = 0;
|
|
enc.version = {};
|
|
|
|
return *this;
|
|
}
|
|
|
|
NetEnc& NetEnc::operator=(const NetEnc& enc)
|
|
{
|
|
if (this == &enc)
|
|
return *this;
|
|
|
|
id = enc.id;
|
|
name = enc.name;
|
|
version = enc.version;
|
|
|
|
return *this;
|
|
}
|
|
|
|
UInt_64 NetEnc::GetId() const
|
|
{
|
|
return id;
|
|
}
|
|
|
|
Str_8 NetEnc::GetName() const
|
|
{
|
|
return name;
|
|
}
|
|
|
|
Version NetEnc::GetVersion() const
|
|
{
|
|
return version;
|
|
}
|
|
|
|
void NetEnc::Encrypt(Byte *data, UInt_64 size) const
|
|
{
|
|
}
|
|
|
|
void NetEnc::Decrypt(Byte *data, UInt_64 size) const
|
|
{
|
|
}
|
|
} |