From: Ben Summers Date: 2008-03-01T05:21:59+09:00 Subject: Re: problem writing inverse to java xor encoding function Chris Hulan wrote: > On Feb 29, 10:56 am, Ben Summers wrote: >> >> edx ^= ecx; >> raw[pos++] = (byte) (ecx >> 16 & 0xFF); >> >> >> Attachments:http://www.ruby-forum.com/attachment/1502/xor.rb >> >> -- >> Posted viahttp://www.ruby-forum.com/. > > FYI > XOR(XOR(x)) == x > > so to decode just run the encoded string through the xor > > Cheers Thanks, yeah I know that, but that requires knowing the original 'key' does it not? The problem is the Ruby program only knows the result after encoding which as far as I'm aware doesn't include the original key that was used for encoding, only the modified key as it is after the pass. But I just had a thought, it's possible the Java app only uses one set key, I'll see if that's the case and then I could just hard-code it in. Cheers -- Posted via http://www.ruby-forum.com/.