[jdev] Re: SOCKS5 Bytestream File Transfer problem
Magnus Henoch
mange at freemail.hu
Fri Feb 25 08:28:24 CST 2005
Anthony Ortiz <anthonypaulo at gmail.com> writes:
> 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.
Ah... I didn't think about that.
But it seems that I accidentally generated the correct hash. The
resources should be stringprepped according to the Resourceprep
profile, which doesn't fold case, even though both the username (by
Nodeprep) and the server (by Nameprep) do. So you need to split the
JIDs and stringprep the parts separately.
Magnus
More information about the JDev
mailing list