Big and Little Endian

We are developing an application using TLI for network communication.The Server Code is developed in Sun and client in SCO unix. When we route data from Client to Server we encrypt the data using DES algotithm utility.The problem we are facing that Sun uses Big Endian methodology to store data in memory while SCO uses Little Endian and so does Windows NT. Cause of this,the data received from the Client generates garbage when decrypted in the Server in Sun using DES algorithm.I would like to receive answers for two questions.
1)By using TLI for communications does it anyway hamper data in network communications with respect to Operating System using Big Endian when data is transfered from an Operating System which uses Little Endian and vice versa.How do we overcome this.

2)What type of algorithm should be followed such that we can be independent of Client/Sever been developed on any flavour of Unix OS overriding the Big/Little Endian methodology for data representation.

Any help is always welcome.

With traditional sockets in a TCP/IP environment, we would use some macros. You can see the macros by typing "man htons". But they only do integers. And they don't do 64 bit. Still, they do work and they are very efficient. I have never used Sun'S XDR, but it is another choice.