Code cleanup

This commit is contained in:
Akkadius 2019-12-23 00:38:58 -06:00
parent 81acd797b4
commit bc4e09cea4
3 changed files with 27 additions and 0 deletions

View File

@ -21,6 +21,10 @@
#endif
/**
* @param mode
* @return
*/
std::string GetEncryptionByModeId(uint32 mode)
{
switch (mode) {
@ -57,6 +61,13 @@ std::string GetEncryptionByModeId(uint32 mode)
}
}
/**
* @param buffer_in
* @param buffer_in_sz
* @param buffer_out
* @param enc
* @return
*/
const char *eqcrypt_block(const char *buffer_in, size_t buffer_in_sz, char *buffer_out, bool enc)
{
#ifdef EQEMU_USE_MBEDTLS
@ -125,6 +136,10 @@ const char *eqcrypt_block(const char *buffer_in, size_t buffer_in_sz, char *buff
return buffer_out;
}
/**
* @param msg
* @return
*/
std::string eqcrypt_md5(const std::string &msg)
{
std::string ret;
@ -159,6 +174,10 @@ std::string eqcrypt_md5(const std::string &msg)
return ret;
}
/**
* @param msg
* @return
*/
std::string eqcrypt_sha1(const std::string &msg)
{
std::string ret;
@ -193,6 +212,10 @@ std::string eqcrypt_sha1(const std::string &msg)
return ret;
}
/**
* @param msg
* @return
*/
std::string eqcrypt_sha512(const std::string &msg)
{
std::string ret;

View File

@ -38,6 +38,7 @@
struct LoginServer
{
public:
LoginServer() : db(nullptr), server_manager(nullptr) {
}

View File

@ -195,6 +195,9 @@ int main(int argc, char **argv)
LoginserverWebserver::RegisterRoutes(api);
}
/**
* Command handler
*/
if (argc > 1) {
LogSys.LoadLogSettingsDefaults();
LogSys.log_settings[Logs::Debug].log_to_console = static_cast<uint8>(Logs::General);