
Originally Posted by
ixoworda
I get this error "Unhandled thread exception" whenever I try to create an Account using the GUI and I can't crate an Account using Navicat because the password column is Encrypted.I've searched the thread and found people that have had the same problem in the past and solved it themselves but they didn't have the common courtesy to post how they did it in case others ran into the same problem so help please?
I use Mangos 0.17.0 v10199 on a 3.3.5a client
You can create an account in-game using the .account create username password command or whatever it is or simply make a new password encrypted in SHA1:
Code:
std::string AccountMgr::CalculateShaPassHash(std::string& name, std::string& password)
{
Sha1Hash sha;
sha.Initialize();
sha.UpdateData(name);
sha.UpdateData(":");
sha.UpdateData(password);
sha.Finalize();
std::string encoded;
hexEncodeByteArray(sha.GetDigest(), sha.GetLength(), encoded);
return encoded;
}