On Wed, Jun 4, 2008 at 3:21 PM, Aidan Skinner <[EMAIL PROTECTED]> wrote:
> On Wed, Jun 4, 2008 at 2:11 PM, Aidan Skinner <[EMAIL PROTECTED]> wrote: Replying to myself this much is clearly a sign of madness. >> The classes do when used directly, but not when called from the SASL >> CRAM-MD5 implementation. I've been digging through the OpenJDK source > I tried the following bit of python as a tie breaker: > And it produces the same answer as the .Net implementation, and > differs from the brokers implementation. The java impl of SASL is broken. It converst the char[] to a String, then calls getBytes(), which is clearly insane and *adds data*. The hash for guest goes in as: 0x08, 0x4e, 0x03, 0x43, 0xa0, 0x48, 0x6f, 0xf0, 0x55, 0x30, 0xdf, 0x6c, 0x70, 0x5c, 0x8b, 0xb4 and comes out as: 0x08,0x4e,0x03,0x43, 0xc2,0xa0,0x48,0x6f, 0xc3,0xb0,0x55,0x30, 0xc3,0x9f,0x6c,0x70, 0x5c,0xc2,0x8b,0xc2, 0xb4 Which not only inserts data, but munges bits of it as well. - Aidan -- aim/y!:aidans42 g:[EMAIL PROTECTED] http://aidan.skinner.me.uk/ "We belong to nobody and nobody belongs to us. We don't even belong to each other."
