Core/DB: Some DB improvements

This commit is contained in:
hondacrx
2018-05-22 11:05:16 -04:00
parent 0be2dc08e2
commit dbd62e5c6f
23 changed files with 360 additions and 294 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ namespace Game
PreparedStatement stmt = DB.Login.GetPreparedStatement(LoginStatements.INS_BNET_ACCOUNT);
stmt.AddValue(0, email);
stmt.AddValue(1, CalculateShaPassHash(email, password));
DB.Login.Execute(stmt);
DB.Login.DirectExecute(stmt);
uint newAccountId = GetId(email);
Contract.Assert(newAccountId != 0);
@@ -173,7 +173,7 @@ namespace Game
return 0;
}
string CalculateShaPassHash(string name, string password)
public string CalculateShaPassHash(string name, string password)
{
SHA256 sha256 = SHA256.Create();
var i = sha256.ComputeHash(Encoding.UTF8.GetBytes(name));