Thanks for the quick reply, but there's no problem with the SHA-1 due to : 1) The difference in our hash results is due to your applying SHA1(sid + from + to) rather than SHA1(sid + Stringprep.nameprep(from + to)), which in this particular case simply transforms the from and to variables to all lowercase. So your hash is based on a string containing uppercase characters while mine was based on lowercase characters, and the protocol specifically states that the JID's need to be Stringprepped, so I assume my hash is correct.
2) I made the mistake of pasting the hash output in uppercase... it should be all lowercase. Anyone else have any ideas??? Anthony On Fri, 25 Feb 2005 14:05:41 +0100, Magnus Henoch <[EMAIL PROTECTED]> wrote: > Anthony Ortiz <[EMAIL PROTECTED]> writes: > > > sid = s5b_8e463861b5e6bc04 > > from = [EMAIL PROTECTED]/Psi > > to = [EMAIL PROTECTED]/JClient > > > > // using libidn/java/gnu/inet/encoding/Stringprep.java -- too boring > > to implement, thk god I found this! > > String SocksHost = SHA1(sid + Stringprep.nameprep(from + to)); // HASH > > OUTPUT=9134A1B74EB358B866C604B1E1B0DDEE0D664967 > > $ echo -n [EMAIL PROTECTED]/[EMAIL PROTECTED]/JClient | sha1 > 5b3427312a46e4f44958cda3e0be1cd94bdd813f > > I'm not sure what goes wrong here... > > Magnus > > _______________________________________________ > jdev mailing list > [email protected] > http://mail.jabber.org/mailman/listinfo/jdev > _______________________________________________ jdev mailing list [email protected] http://mail.jabber.org/mailman/listinfo/jdev
