/[mcrypt]/libmcrypt-nm/lib/swap.h
ViewVC logotype

Contents of /libmcrypt-nm/lib/swap.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (show annotations) (vendor branch)
Mon May 22 13:09:11 2000 UTC (23 years, 10 months ago) by nmav
Branch: MAIN, mcrypt
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/plain

1
2 word16 byteswap_16(word16 x);
3
4 #define FAST
5
6 #ifdef FAST
7 #define rotl(x,n) (((x) << ((word32)(n))) | ((x) >> (32 - (word32)(n))))
8 #define rotr(x,n) (((x) >> ((word32)(n))) | ((x) << (32 - (word32)(n))))
9 #define rotl16(x,n) (((x) << ((word16)(n))) | ((x) >> (16 - (word16)(n))))
10 #define rotr16(x,n) (((x) >> ((word16)(n))) | ((x) << (16 - (word16)(n))))
11 #define byteswap(x) ((rotl(x, 8) & 0x00ff00ff) | (rotr(x, 8) & 0xff00ff00))
12 #else
13 word16 rotl16(word16 v, word16 cnt);
14 word16 rotr16(word16 v, word16 cnt);
15 word32 rotl(word32 v, word32 cnt);
16 word32 rotr(word32 v, word32 cnt);
17 word32 byteswap(word32 x);
18 #endif

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26