Quote Originally Posted by JSoftware
A byte shouldn't be the source of endianess problems
Yeah, after reading up on endianess a bit I realize how stupid that sounded.

Quote Originally Posted by JSoftware
Try this instead:
TempString := TempString + Char(Byte(S[I]) xor hi(Key));
How about doing:
[pascal]TempString := TempString + Char(Byte(S[I]) xor (NtoLE(Key) shr );
[/pascal]
Shouldn't that convert the Key to little-endian before doing the encrypt/decrypt?