File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Lost in XOR Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Lost in XOR" Watch "Lost in XOR" New topic
Author

Lost in XOR

Iain Emsley
Ranch Hand

Joined: Oct 11, 2007
Posts: 60
I have a cookie which requires the XOR function to decode the string. I believe that I've got the underpinnings by which I get the key to unlock the value but I'm not sure how to get the final result.

In the Perl code that I'm porting from, the key is unlocked by the decoded hexstring of the original pass being XORed against the key but I suspect I've gone really quite awry in the last line. I'd be grateful for some help in sorting this issue out.
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
Well I like sorting things out and xor seems natural to me so lets start with trying   ^=   or whatever the correct form is for XOR op / op with assignment. Your xor as you have it may ( I think ) be useful in a boolean but does the xor operation without putting the result anywhere.


"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Lost in XOR