6 |
/* Use hardware rotations.. when available */ |
/* Use hardware rotations.. when available */ |
7 |
#ifdef swap32 |
#ifdef swap32 |
8 |
# define byteswap32(x) swap32(x) |
# define byteswap32(x) swap32(x) |
9 |
#else |
#else |
10 |
# ifdef swap_32 |
# ifdef swap_32 |
11 |
# define byteswap32(x) swap_32(x) |
# define byteswap32(x) swap_32(x) |
12 |
# else |
# else |
20 |
|
|
21 |
#ifdef swap16 |
#ifdef swap16 |
22 |
# define byteswap16(x) swap16(x) |
# define byteswap16(x) swap16(x) |
23 |
#else |
#else |
24 |
# ifdef swap_16 |
# ifdef swap_16 |
25 |
# define byteswap16(x) swap_16(x) |
# define byteswap16(x) swap_16(x) |
26 |
# else |
# else |
32 |
# endif |
# endif |
33 |
#endif |
#endif |
34 |
|
|
35 |
|
inline static |
36 |
|
void memxor(unsigned char *o1, unsigned char *o2, int length) |
37 |
|
{ |
38 |
|
int i; |
39 |
|
|
40 |
|
for (i = 0; i < length; i++) { |
41 |
|
o1[i] ^= o2[i]; |
42 |
|
} |
43 |
|
return; |
44 |
|
} |
45 |
|
|
46 |
|
|
47 |
#define Bzero(x, y) memset(x, 0, y) |
#define Bzero(x, y) memset(x, 0, y) |