[jdev] handshake (in php) - compute 16 octet md5 hash
Dave Cridland
dave at cridland.net
Tue Sep 7 20:22:23 CST 2010
On Tue Sep 7 21:13:41 2010, Charlie Stoytgevich wrote:
> http://web.archive.org/web/20050224191820/http://cataclysm.cx/wip/digest-md5-crash.htmlstates
>
>
I wouldn't actually take an archived document from 7 years ago over
the RFC itself...
> id like a clarification of this, and if possible a solution i could
> implement (php if possible). any help would be much appreciated!
MD5 produces a 128-bit (16-octet) number, but an MD5 hash is normally
written as a 32-character hex string.
You can do all this with PHP, I did it myself a few years ago, but
you might find it easier just to use:
http://phpxref.com/xref/eventum/include/pear/Auth/SASL/DigestMD5.php.html
I can't tell you if that class expects the challenges and responses
to be base64 encoded or not, though - the base64 step is part of
XMPP, not SASL.
Dave.
--
Dave Cridland - mailto:dave at cridland.net - xmpp:dwd at dave.cridland.net
- acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
- http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade
More information about the JDev
mailing list