|
|
1.1.1.3 ! root 1: /* The source code contained in this file has been derived from the source code ! 2: of Encryption for the Masses 2.02a by Paul Le Roux. Modifications and ! 3: additions to that source code contained in this file are Copyright (c) 2004 ! 4: TrueCrypt Team and Copyright (c) 2004 TrueCrypt Foundation. Unmodified ! 5: parts are Copyright (c) 1998-99 Paul Le Roux. This is a TrueCrypt Foundation ! 6: release. Please see the file license.txt for full license details. */ 1.1 root 7: 8: #define mputLong(memPtr,data) \ 9: *memPtr++ = ( unsigned char ) ( ( ( data ) >> 24 ) & 0xFF ), \ 10: *memPtr++ = ( unsigned char ) ( ( ( data ) >> 16 ) & 0xFF ), \ 11: *memPtr++ = ( unsigned char ) ( ( ( data ) >> 8 ) & 0xFF ), \ 12: *memPtr++ = ( unsigned char ) ( ( data ) & 0xFF ) 13: 14: #define mputWord(memPtr,data) \ 15: *memPtr++ = ( unsigned char ) ( ( ( data ) >> 8 ) & 0xFF ), \ 16: *memPtr++ = ( unsigned char ) ( ( data ) & 0xFF ) 17: 18: #define mputByte(memPtr,data) \ 19: *memPtr++ = ( unsigned char ) data 20: 21: #define mputBytes(memPtr,data,len) \ 22: memcpy (memPtr,data,len); \ 23: memPtr += len; 24: 25: /* Macros to read and write 16 and 32-bit quantities in a portable manner. 26: These functions are implemented as macros rather than true functions as 27: the need to adjust the memory pointers makes them somewhat painful to call 28: in user code */ 29: 30: #define mgetLong(memPtr) \ 31: ( memPtr += 4, ( ( unsigned long ) memPtr[ -4 ] << 24 ) | ( ( unsigned long ) memPtr[ -3 ] << 16 ) | \ 32: ( ( unsigned long ) memPtr[ -2 ] << 8 ) | ( unsigned long ) memPtr[ -1 ] ) 33: 34: #define mgetWord(memPtr) \ 35: ( memPtr += 2, ( unsigned short ) memPtr[ -2 ] << 8 ) | ( ( unsigned short ) memPtr[ -1 ] ) 36: 37: #define mgetByte(memPtr) \ 38: ( ( unsigned char ) *memPtr++ ) 39: 40: 41: #define LITTLE_ENDIAN 1 42: 43: /* Everything below this line is automatically updated by the -mkproto-tool- */ 44: 45: void LongReverse ( unsigned long *buffer , unsigned byteCount );
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.