mirror of
https://github.com/HikikoMarmy/Champions-Reborn-Server.git
synced 2026-04-10 10:59:48 -03:00
General cleanup.
This commit is contained in:
@@ -69,7 +69,7 @@ void ByteStream::write_utf8( const std::string &value )
|
||||
|
||||
void ByteStream::write_utf16( const std::wstring &value )
|
||||
{
|
||||
write_u32( value.size() );
|
||||
write_u32( value.size() + 1 );
|
||||
|
||||
std::vector< uint8_t > utf16;
|
||||
for( auto c : value )
|
||||
@@ -79,6 +79,7 @@ void ByteStream::write_utf16( const std::wstring &value )
|
||||
}
|
||||
|
||||
write_bytes( utf16 );
|
||||
write_u16( 0 );
|
||||
}
|
||||
|
||||
void ByteStream::write_sz_utf8( const std::string &value )
|
||||
|
||||
@@ -46,43 +46,4 @@ public:
|
||||
|
||||
// Initializer state for srand.
|
||||
static bool ms_initialized;
|
||||
};
|
||||
|
||||
|
||||
/*class Encryptor {
|
||||
private:
|
||||
// "dlfk qs';r+t iqe4t9ueerjKDJ wdaj";
|
||||
const static inline std::vector< uint8_t > default_sym_key =
|
||||
{
|
||||
0x64, 0x6c, 0x66, 0x6b, 0x20, 0x71, 0x73, 0x27,
|
||||
0x3b, 0x72, 0x2b, 0x74, 0x20, 0x69, 0x71, 0x65,
|
||||
0x34, 0x74, 0x39, 0x75, 0x65, 0x65, 0x72, 0x6a,
|
||||
0x4b, 0x44, 0x4a, 0x20, 0x77, 0x64, 0x61, 0x6a
|
||||
};
|
||||
|
||||
public:
|
||||
Encryptor();
|
||||
|
||||
std::vector< uint8_t > generateSymmetricKey( void );
|
||||
|
||||
std::string encryptString( std::string &input );
|
||||
std::string decryptString( std::string &input );
|
||||
std::wstring encryptString( std::wstring &input );
|
||||
std::wstring decryptString( std::wstring &input );
|
||||
|
||||
std::vector< uint8_t > encryptSymmetric( std::vector< const uint8_t > &input );
|
||||
std::vector< uint8_t > decryptSymmetric( std::vector< const uint8_t > &input );
|
||||
|
||||
std::vector< uint8_t > encryptSymmetric( std::span< const uint8_t > input );
|
||||
std::vector< uint8_t > decryptSymmetric( std::span< const uint8_t > input );
|
||||
|
||||
void setSymmetricKey( const std::vector< uint8_t > &input );
|
||||
std::vector< uint8_t > getSymmetricKey( void ) const;
|
||||
|
||||
void test();
|
||||
|
||||
std::vector< uint8_t > m_symKey;
|
||||
|
||||
static bool ms_initialized;
|
||||
};*/
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user