28 #define RotL_64(x,N) (((x) << (N)) | ((x) >> (64-(N))))
50 #ifndef SKEIN_NEED_SWAP
53 #if PLATFORM_BYTE_ORDER == IS_BIG_ENDIAN
55 #define SKEIN_NEED_SWAP (1)
56 #elif PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN
58 #define SKEIN_NEED_SWAP (0)
59 #if PLATFORM_MUST_ALIGN == 0
60 #define Skein_Put64_LSB_First(dst08,src64,bCnt) memcpy(dst08,src64,bCnt)
61 #define Skein_Get64_LSB_First(dst64,src08,wCnt) memcpy(dst64,src08,8*(wCnt))
64 #error "Skein needs endianness setting!"
76 #define Skein_Swap64(w64) \
77 ( (( ((u64b_t)(w64)) & 0xFF) << 56) | \
78 (((((u64b_t)(w64)) >> 8) & 0xFF) << 48) | \
79 (((((u64b_t)(w64)) >>16) & 0xFF) << 40) | \
80 (((((u64b_t)(w64)) >>24) & 0xFF) << 32) | \
81 (((((u64b_t)(w64)) >>32) & 0xFF) << 24) | \
82 (((((u64b_t)(w64)) >>40) & 0xFF) << 16) | \
83 (((((u64b_t)(w64)) >>48) & 0xFF) << 8) | \
84 (((((u64b_t)(w64)) >>56) & 0xFF) ) )
86 #define Skein_Swap64(w64) (w64)
91 #ifndef Skein_Put64_LSB_First
93 #ifdef SKEIN_PORT_CODE
98 dst[n] = (
u08b_t) (src[n>>3] >> (8*(n&7)));
106 #ifndef Skein_Get64_LSB_First
108 #ifdef SKEIN_PORT_CODE
112 for (n=0;n<8*wCnt;n+=8)
113 dst[n/8] = (((
u64b_t) src[n ]) ) +
114 (((
u64b_t) src[n+1]) << 8) +
115 (((
u64b_t) src[n+2]) << 16) +
116 (((
u64b_t) src[n+3]) << 24) +
117 (((
u64b_t) src[n+4]) << 32) +
118 (((
u64b_t) src[n+5]) << 40) +
119 (((
u64b_t) src[n+6]) << 48) +
120 (((
u64b_t) src[n+7]) << 56) ;
void Skein_Put64_LSB_First(u08b_t *dst, const u64b_t *src, size_t bCnt)
void Skein_Get64_LSB_First(u64b_t *dst, const u08b_t *src, size_t wCnt)