mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 16:07:12 +01:00
encrypt password and account number
* the encryption uses a unique machine key, this means that if anyone steals config.otml with a saved password, he will not be able to decrypt the password without the machine UUID key * the encrypt uses a simple XOR encryption method, encoded with base64 and adler32 summing
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include <framework/core/modulemanager.h>
|
||||
#include <framework/core/module.h>
|
||||
#include <framework/sound/soundmanager.h>
|
||||
#include <framework/util/crypt.h>
|
||||
|
||||
void Application::registerLuaFunctions()
|
||||
{
|
||||
@@ -46,6 +47,10 @@ void Application::registerLuaFunctions()
|
||||
g_lua.bindGlobalFunction("colortostring", [](const Color& v) { return stdext::to_string(v); });
|
||||
g_lua.bindGlobalFunction("sizetostring", [](const Size& v) { return stdext::to_string(v); });
|
||||
|
||||
g_lua.registerStaticClass("g_crypt");
|
||||
g_lua.bindClassStaticFunction("g_crypt", "encrypt", Crypt::encrypt);
|
||||
g_lua.bindClassStaticFunction("g_crypt", "decrypt", Crypt::decrypt);
|
||||
|
||||
// Event
|
||||
g_lua.registerClass<Event>();
|
||||
g_lua.bindClassMemberFunction<Event>("cancel", &Event::cancel);
|
||||
|
||||
Reference in New Issue
Block a user