News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Integrating Members with a game server

Started by Ry60003333, April 25, 2008, 06:13:39 PM

Previous topic - Next topic

Ry60003333

I need to integrate the user accounts on SMF with a game server written in Java. I've already got the MySQL connection done, and can get any fields from any table. I need to be able to decrypt the password in the database, and I am wondering how I can do this.
Or, is there a way to disable the encryption, but I really don't want to do that, because that is one of the reasons I want to use the SMF accounts.  :-\

If someone has PHP code that decrypts it on its own, I can code my own Java version.  :)

Minalien

There is no way to 'decrypt' the passwords, as they use an MD5 hash and a random seed. All you have to do is find the way SMF uses the seed and entered password upon registration, and have your java application use that same method to encrypt the passwords for when it's being checked. I had the conversion at one point, but I'm not 100% sure of what it is anymore, I'll see if I cant find it again
あたしは女の子になりたいです。

rsw686

The password is stored as

sha1(strtolower($username) . $password)

You don't need to worry about the random salt. It is used for cookies and is regenerated at each login.

SMF's way of storing passwords is very secure. With the username hashed in you can't just do a brute force attack on all the users.
The Reptile File
Everything reptile for anyone reptile friendly

Aquaria Talk
Community for freshwater and saltwater aquariums enthusiasts

Advertisement: