1 |
nmav |
1.1 |
#define rotl(x,n) (((x) << ((word32)(n))) | ((x) >> (32 - (word32)(n)))) |
2 |
|
|
#define rotr(x,n) (((x) >> ((word32)(n))) | ((x) << (32 - (word32)(n)))) |
3 |
|
|
#define rotl16(x,n) (((x) << ((word16)(n))) | ((x) >> (16 - (word16)(n)))) |
4 |
|
|
#define rotr16(x,n) (((x) >> ((word16)(n))) | ((x) << (16 - (word16)(n)))) |
5 |
|
|
#define byteswap(x) ((rotl(x, 8) & 0x00ff00ff) | (rotr(x, 8) & 0xff00ff00)) |
6 |
|
|
#define byteswap_16(x) ((rotl16(x, 8) & 0x00ff) | (rotr16(x, 8) & 0xff00)) |
7 |
|
|
|
8 |
|
|
#define Bzero(x, y) memset(x, 0, y) |