Careful; it is not Unix vs. Windows, but rather Big-endian vs. Little-endian. There is a difference in opinon as to which way is better (the designers of CPUs need to worry about this), but for us who use the computers, all we need to do is make sure we can handle either properly. See the man pages to htonl, htons, ntohl, ntohs. These are networking functions, and they convert to and from "host" (what is natural for that system) and "network" (I forget if big or little endian). > -----Original Message----- > From: Adam Berent [SMTP:adminat_private] > Sent: Sunday, May 06, 2001 10:00 AM > To: SECPROGat_private > Subject: Unix/Windows bit arrangments > > Hi, I have been playing with the blowfish encryption algorithm for some > time now. I feel I understand it fairly well. > > My only problem is the incompatibilty between the executables I compiled > under Windows and Unix. As far as I can tell the order of the encrypted > bytes is reversed. For example in Windows the bytes would be 1234 5678 > while in Unix they are 4321 8765. Eaach of the for bytes are represented > by unsigned longs > > I do remember from my C++ class that Unix has a different way of maping > bits (reverse to Windows) The specfics escape me. However I would like > to know why this is happening and how do I correct it. > > Thanks for all your help > > P.S. I wraped the lines at 72 chars, please let me know if its ok now > > > > > > > Adam Berent > www.abisoft.net > www.ideveloperonline.com > > Get your free email @ www.ideveloperonline.com
This archive was generated by hypermail 2b30 : Mon May 07 2001 - 10:28:57 PDT