Go to the documentation of this file. 1 #ifndef __XRDCKSCALCADLER32_HH__
2 #define __XRDCKSCALCADLER32_HH__
33 #include <sys/types.h>
34 #include <netinet/in.h>
75 #define DO1(buf) {unSum1 += *buf++; unSum2 += unSum1;}
76 #define DO2(buf) DO1(buf); DO1(buf);
77 #define DO4(buf) DO2(buf); DO2(buf);
78 #define DO8(buf) DO4(buf); DO4(buf);
79 #define DO16(buf) DO8(buf); DO8(buf);
87 #ifndef Xrd_Big_Endian
97 void Update(
const char *Buff,
int BLen)
99 unsigned char *buff = (
unsigned char *)Buff;
103 while(k >= 16) {
DO16(buff); k -= 16;}
104 if (k != 0)
do {
DO1(buff);}
while (--k);