Posts: 368
Threads: 94
Joined: Mar 2012
Reputation:
0
I'm using one-way encryption for player passwords but now I need two-way encryption for admin password/pin since people must be able to check their admin password and edit it (wich gets generated randomly) IG.
Thank you.
Posts: 4,759
Threads: 33
Joined: Dec 2013
Reputation:
0
Hashes aren't encryption, they're one way only. Encryption can be reversed.
Just add a new field in your database, create a hash, save and load it how you would do normally, and make admins log into to their accounts then into their admin accounts for admin permissions.
Posts: 506
Threads: 15
Joined: Mar 2009
Reputation:
0
Do not use two-way encryption, ever. You shouldn't be able to decrypt an encrypted string!
If you have a system that randomly generates a password, force them to make a new one the first time they want to log in. This newly created password should then override the randomly generated one.