Hi Remy! Remy HAREL schrieb am 2004-05-07 17:14:08: > I don't understand why I would have to use x-prep profiles, I make the > md5 sum of the jid_full(sess->jid) and it works fine. Yet, my problem is > to know if [EMAIL PROTECTED]/Gabber and [EMAIL PROTECTED]/Gabber > are the same users or not. If they are, my md5 sum is perfect, but if > not, I would have to use your x-prep profile.
"[EMAIL PROTECTED]/Gabber" is the same user as
"[EMAIL PROTECTED]/Gabber".
In this case md5(lowercase(jid_full)) would work.
"[EMAIL PROTECTED]/Gabber" and "[EMAIL PROTECTED]/gabber" are two
different addresses. Therefore md5(lowercase(jid_full)) would result in
the same hash for two different addresses!
"[EMAIL PROTECTED]/Gabber" and "[EMAIL PROTECTED]/Gabber" are
the same users. But as normal impelemtations of lowercase() only convert
the letters A to Z but not 'accented' letters like "�",
md5(lowercase(jid_full)) would result in two different hashes for the
same address. Therefore you need a version of lowercase() that knows
about all the normalizations of all letters in unicode. This is exactly
what stringprep does. The profile in this case (a bit simplified) just
tells you which letters are allowed at all and which are forbidden.
Tot kijk
Matthias
--
Fon: +49-(0)70 0770 07770 http://matthias.wimmer.name/
HAM: DB1MW xmpp:[EMAIL PROTECTED]
signature.asc
Description: Digital signature
_______________________________________________ jdev mailing list [EMAIL PROTECTED] https://jabberstudio.org/mailman/listinfo/jdev
