1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

need user password to connect xenforo with my gameserver

Discussion in 'XenForo Development Discussions' started by Vasaken, Nov 16, 2013.

  1. Vasaken

    Vasaken Member

    Hey guys,

    so as explained in the title, i need every user's xenforo password, to allow them to login on my gameserver. I know where to find the password (xf_user_authenticate > field "remember_key"). But how could i get the password as it is hashed. Or how do i know how it is hashed, so i can do exactly the same hash ingame?

    Thanks in advance!

    - Vasaken
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  3. Vasaken

    Vasaken Member

    Thank you for the quick reply.
    So Iam currently using this method to hash stuff. I've tried SHA-1 & SHA-256 but I got different keys with both of them using the "remember_key".

    public static String sha256(String base) {
            MessageDigest digest = MessageDigest.getInstance("SHA-256");
            byte[] hash = digest.digest(base.getBytes("UTF-8"));
            StringBuffer hexString = new StringBuffer();
            for (int i = 0; i < hash.length; i++) {
                String hex = Integer.toHexString(0xff & hash[i]);
                if(hex.length() == 1) hexString.append('0');
            return hexString.toString();
        } catch(Exception ex){
          throw new RuntimeException(ex);
    Thanks in advance!

    - Vasaken

    EDIT: I found out that there is some "Salt" missing, but how can I find out whats the salt?
    Last edited: Nov 16, 2013
  4. Jeremy

    Jeremy Well-Known Member

    The remember key is *not* the hashed version of the password. The remember key is a separate hash (not sure what it is comprised of) that is stored within the cookie to verify quickly it is that user.
  5. Vasaken

    Vasaken Member

    Okay, thanks!

    So where is the password stored? And how do i encrypt a String to look exactly like the xenforo password?

    - Vasaken
  6. Jeremy

    Jeremy Well-Known Member

    Where is the game located? On the same server or completely different servers?
  7. Vasaken

    Vasaken Member

    The gameserver and my forum are running on the same server.
    Thanks for helping!

    - Vasaken

Share This Page