/*---------------------------------------- handle most of the key */
while (len >= 12) {
- a += (tolower(k[0]) +((uint32_t)tolower(k[1])<<8) +((uint32_t)tolower(k[2])<<16) +((uint32_t)tolower(k[3])<<24));
- b += (tolower(k[4]) +((uint32_t)tolower(k[5])<<8) +((uint32_t)tolower(k[6])<<16) +((uint32_t)tolower(k[7])<<24));
- c += (tolower(k[8]) +((uint32_t)tolower(k[9])<<8) +((uint32_t)tolower(k[10])<<16)+((uint32_t)tolower(k[11])<<24));
+ a += (dns_tolower(k[0]) +((uint32_t)dns_tolower(k[1])<<8) +((uint32_t)dns_tolower(k[2])<<16) +((uint32_t)dns_tolower(k[3])<<24));
+ b += (dns_tolower(k[4]) +((uint32_t)dns_tolower(k[5])<<8) +((uint32_t)dns_tolower(k[6])<<16) +((uint32_t)dns_tolower(k[7])<<24));
+ c += (dns_tolower(k[8]) +((uint32_t)dns_tolower(k[9])<<8) +((uint32_t)dns_tolower(k[10])<<16)+((uint32_t)dns_tolower(k[11])<<24));
burtlemix(a,b,c);
k += 12; len -= 12;
}
/*------------------------------------- handle the last 11 bytes */
c += length;
switch(len) { /* all the case statements fall through */
- case 11: c+=((uint32_t)tolower(k[10])<<24);
- case 10: c+=((uint32_t)tolower(k[9])<<16);
- case 9 : c+=((uint32_t)tolower(k[8])<<8);
+ case 11: c+=((uint32_t)dns_tolower(k[10])<<24);
+ case 10: c+=((uint32_t)dns_tolower(k[9])<<16);
+ case 9 : c+=((uint32_t)dns_tolower(k[8])<<8);
/* the first byte of c is reserved for the length */
- case 8 : b+=((uint32_t)tolower(k[7])<<24);
- case 7 : b+=((uint32_t)tolower(k[6])<<16);
- case 6 : b+=((uint32_t)tolower(k[5])<<8);
- case 5 : b+=tolower(k[4]);
- case 4 : a+=((uint32_t)tolower(k[3])<<24);
- case 3 : a+=((uint32_t)tolower(k[2])<<16);
- case 2 : a+=((uint32_t)tolower(k[1])<<8);
- case 1 : a+=tolower(k[0]);
+ case 8 : b+=((uint32_t)dns_tolower(k[7])<<24);
+ case 7 : b+=((uint32_t)dns_tolower(k[6])<<16);
+ case 6 : b+=((uint32_t)dns_tolower(k[5])<<8);
+ case 5 : b+=dns_tolower(k[4]);
+ case 4 : a+=((uint32_t)dns_tolower(k[3])<<24);
+ case 3 : a+=((uint32_t)dns_tolower(k[2])<<16);
+ case 2 : a+=((uint32_t)dns_tolower(k[1])<<8);
+ case 1 : a+=dns_tolower(k[0]);
/* case 0: nothing left to add */
}
burtlemix(a,b,c);