Make it so we can login to accounts created with TC

This commit is contained in:
hondacrx
2020-08-20 23:23:23 -04:00
parent 062eecf20b
commit 165ae9e4f0
4 changed files with 20 additions and 17 deletions
+2 -2
View File
@@ -41,7 +41,7 @@ namespace Game
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.INS_BNET_ACCOUNT);
stmt.AddValue(0, email);
stmt.AddValue(1, CalculateShaPassHash(email, password));
stmt.AddValue(1, CalculateShaPassHash(email.ToUpper(), password.ToUpper()));
DB.Login.DirectExecute(stmt);
uint newAccountId = GetId(email);
@@ -176,7 +176,7 @@ namespace Game
{
SHA256 sha256 = SHA256.Create();
var i = sha256.ComputeHash(Encoding.UTF8.GetBytes(name));
return sha256.ComputeHash(Encoding.UTF8.GetBytes(i.ToHexString() + ":" + password)).ToHexString();
return sha256.ComputeHash(Encoding.UTF8.GetBytes(i.ToHexString() + ":" + password)).ToHexString(true);
}
}
}