The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
authenticate password via java
Hello. I have a website done in java/.jsp and has a forums and user pages to check status on RMA's, rebates, etc. We are moving to vBulletin and i wanted to just have 1 user table. Once the data has been migrated to vBulletin, i still want to log in the user from a .jsp page if they are not in the Forums. I see from forum posts that the password is created using MD5 like such MD5(MD5($password) + $salt).
I tried to do the same on the java end using some quick code, but my result is not the same. Has anyone done this or can suggest anything that i can match the codes to authenticate the user? My java code is below. public static synchronized String encrypt(String plaintext) throws Exception { MessageDigest md = null; try { md = MessageDigest.getInstance("MD5"); //step 2 } catch(NoSuchAlgorithmException e) { throw new Exception(e.getMessage()); } try { md.update(plaintext.getBytes("UTF-8")); //step 3 } catch(UnsupportedEncodingException e) { throw new Exception(e.getMessage()); } byte raw[] = md.digest(); //step 4 String secbyte = new String(raw); System.out.println("secbyte is " + secbyte); plaintext = secbyte + "24V"; System.out.println("plaintext is " + plaintext); md.update(plaintext.getBytes("UTF-8")); byte raws[] = md.digest(); System.out.println("raws is " + raws); String hash = (new BASE64Encoder()).encode(raws); //step 5 return hash; //step 6 } the password i am trying to encrypt is "test" on the code above it comes out -> LXwYEAzMhmx4kV0JkJgNhA== yet in the vBulletin db it's -> 1a0303cc71581a9688ba2998b118378e my $salt is "24V" thanks for any help. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|