Search the Community
Showing results for tags 'auth'.
Found 2 results
So i guess it is pretty obvious about what am i going to ask =) Problem is, previousle we could just sha1 username and password separated by colon and here is the sha_pass_hash. The problem i am facing right now, is that according to https://github.com/TrinityCore/TrinityCore/blob/86b98686a95e23247ecb774fb23ecd5b8d94b97b/src/server/game/Accounts/BattlenetAccountMgr.cpp#L177 Trinity now uses SHA256, so the hashes do not match anymore. The thing is, password length in database is 40 symbols (exactly as many as in sha1 hash), but sha256 hash length is 64 characters long. I am confused... I've tried to recreate whole "Cryptography" thing on PHP but, guess what, failed. Can somebody explain me how the password is generated nowadays? Thank you for your attention.
I know that the proper syntax while creating a user account in php is to run the username and password as upper and sha1 sha1("USER:PASS") But my question is more say you want to have a way to update the password? I tried with a standard query UPDATE accounts SET sha_pass_hash = sha1("USERNAME:NEWPASS") WHERE username = :arg :arg is just a general username placeholder, but when I run that command. it still takes the old login information. I know you can use the console to set the password, but I'm looking at ways to run it when the server is offline, Does anyone know why this doesn't work?