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:
Eduardo Bart
2012-06-04 09:38:15 -03:00
parent 296f2a17c4
commit e5000fa577
13 changed files with 249 additions and 32 deletions

View File

@@ -40,7 +40,7 @@ local function tryLogin(charInfo, tries)
CharacterList.destroyLoadBox()
g_game.loginWorld(EnterGame.account, EnterGame.password, charInfo.worldName, charInfo.worldHost, charInfo.worldPort, charInfo.characterName)
g_game.loginWorld(G.account, G.password, charInfo.worldName, charInfo.worldHost, charInfo.worldPort, charInfo.characterName)
loadBox = displayCancelBox(tr('Please wait'), tr('Connecting to game server...'))
connect(loadBox, { onCancel = function()
@@ -81,6 +81,10 @@ function CharacterList.init()
connect(g_game, { onConnectionError = onGameConnectionError })
connect(g_game, { onGameStart = CharacterList.destroyLoadBox })
connect(g_game, { onGameEnd = CharacterList.showAgain })
if G.characters then
CharacterList.create(G.characters, G.premDays)
end
end
function CharacterList.terminate()
@@ -100,7 +104,9 @@ function CharacterList.terminate()
end
function CharacterList.create(characters, premDays)
CharacterList.show()
G.characters = characters
G.premDays = premDays
characterList:destroyChildren()
local accountStatusLabel = charactersWindow:getChildById('accountStatusLabel')