techguy Posted April 25, 2010 Share Posted April 25, 2010 Hi There, I'm working on a PHP script for logging into a WHMCS controlled DirectAdmin panel. I need to know how to hash the user password so as to be able to compare to the hash in the DB for authorization. Just wondering what algorithm is used for hashing the passwords. It seems the hashes are stored in the format: <32Bit hash here>:<5 characters> Any ideas? Would this be restricted information? Regards. 0 Quote Link to comment Share on other sites More sharing options...
Damo Posted April 25, 2010 Share Posted April 25, 2010 It's an MD5 hash isn't it? Check out the API docs: http://wiki.whmcs.com/API:Encrypt_Password http://wiki.whmcs.com/API:Get_Clients_Password 0 Quote Link to comment Share on other sites More sharing options...
tadeck Posted May 25, 2010 Share Posted May 25, 2010 (edited) It's an MD5 hash isn't it? Yes, it is. The value in the database is created in a way similar to this: $password = 'your_password'; $salt = 'pVeJP'; $hash = md5($salt.$password).':'.$salt; The value in the database is $hash. I don't know, how the $salt is generated (it should be random, I think). Edited May 25, 2010 by tadeck 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.