Lines Matching refs:b

124 #define mix(a,b,c) \  argument
126 a -= c; a ^= rot(c, 4); c += b; \
127 b -= a; b ^= rot(a, 6); a += c; \
128 c -= b; c ^= rot(b, 8); b += a; \
129 a -= c; a ^= rot(c,16); c += b; \
130 b -= a; b ^= rot(a,19); a += c; \
131 c -= b; c ^= rot(b, 4); b += a; \
159 #define final(a,b,c) \ argument
161 c ^= b; c -= rot(b,14); \
163 b ^= a; b -= rot(a,25); \
164 c ^= b; c -= rot(b,16); \
166 b ^= a; b -= rot(a,14); \
167 c ^= b; c -= rot(b,24); \
188 uint32_t a,b,c; in jenkins_hashword() local
191 a = b = c = 0xdeadbeef + (((uint32_t)length)<<2) + initval; in jenkins_hashword()
197 b += k[1]; in jenkins_hashword()
199 mix(a,b,c); in jenkins_hashword()
208 case 2 : b+=k[1]; in jenkins_hashword()
210 final(a,b,c); in jenkins_hashword()
232 uint32_t a,b,c; in jenkins_hashword2() local
235 a = b = c = 0xdeadbeef + ((uint32_t)(length<<2)) + *pc; in jenkins_hashword2()
242 b += k[1]; in jenkins_hashword2()
244 mix(a,b,c); in jenkins_hashword2()
253 case 2 : b+=k[1]; in jenkins_hashword2()
255 final(a,b,c); in jenkins_hashword2()
260 *pc=c; *pb=b; in jenkins_hashword2()
292 uint32_t a,b,c; /* internal state */ in jenkins_hashlittle() local
296 a = b = c = 0xdeadbeef + ((uint32_t)length) + initval; in jenkins_hashlittle()
306 b += k[1]; in jenkins_hashlittle()
308 mix(a,b,c); in jenkins_hashlittle()
327 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle()
328 case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle()
329 case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle()
330 case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle()
331 case 8 : b+=k[1]; a+=k[0]; break; in jenkins_hashlittle()
332 case 7 : b+=k[1]&0xffffff; a+=k[0]; break; in jenkins_hashlittle()
333 case 6 : b+=k[1]&0xffff; a+=k[0]; break; in jenkins_hashlittle()
334 case 5 : b+=k[1]&0xff; a+=k[0]; break; in jenkins_hashlittle()
348 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle()
352 case 8 : b+=k[1]; a+=k[0]; break; in jenkins_hashlittle()
353 case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */ in jenkins_hashlittle()
354 case 6 : b+=((uint32_t)k8[5])<<8; /* fall through */ in jenkins_hashlittle()
355 case 5 : b+=k8[4]; /* fall through */ in jenkins_hashlittle()
374 b += k[2] + (((uint32_t)k[3])<<16); in jenkins_hashlittle()
376 mix(a,b,c); in jenkins_hashlittle()
386 b+=k[2]+(((uint32_t)k[3])<<16); in jenkins_hashlittle()
391 b+=k[2]+(((uint32_t)k[3])<<16); in jenkins_hashlittle()
395 case 8 : b+=k[2]+(((uint32_t)k[3])<<16); in jenkins_hashlittle()
398 case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */ in jenkins_hashlittle()
399 case 6 : b+=k[2]; in jenkins_hashlittle()
402 case 5 : b+=k8[4]; /* fall through */ in jenkins_hashlittle()
423 b += k[4]; in jenkins_hashlittle()
424 b += ((uint32_t)k[5])<<8; in jenkins_hashlittle()
425 b += ((uint32_t)k[6])<<16; in jenkins_hashlittle()
426 b += ((uint32_t)k[7])<<24; in jenkins_hashlittle()
431 mix(a,b,c); in jenkins_hashlittle()
443 case 8 : b+=((uint32_t)k[7])<<24; in jenkins_hashlittle()
444 case 7 : b+=((uint32_t)k[6])<<16; in jenkins_hashlittle()
445 case 6 : b+=((uint32_t)k[5])<<8; in jenkins_hashlittle()
446 case 5 : b+=k[4]; in jenkins_hashlittle()
456 final(a,b,c); in jenkins_hashlittle()
476 uint32_t a,b,c; /* internal state */ in jenkins_hashlittle2() local
480 a = b = c = 0xdeadbeef + ((uint32_t)length) + *pc; in jenkins_hashlittle2()
491 b += k[1]; in jenkins_hashlittle2()
493 mix(a,b,c); in jenkins_hashlittle2()
512 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle2()
513 case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle2()
514 case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle2()
515 case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle2()
516 case 8 : b+=k[1]; a+=k[0]; break; in jenkins_hashlittle2()
517 case 7 : b+=k[1]&0xffffff; a+=k[0]; break; in jenkins_hashlittle2()
518 case 6 : b+=k[1]&0xffff; a+=k[0]; break; in jenkins_hashlittle2()
519 case 5 : b+=k[1]&0xff; a+=k[0]; break; in jenkins_hashlittle2()
524 case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */ in jenkins_hashlittle2()
533 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in jenkins_hashlittle2()
537 case 8 : b+=k[1]; a+=k[0]; break; in jenkins_hashlittle2()
538 case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */ in jenkins_hashlittle2()
539 case 6 : b+=((uint32_t)k8[5])<<8; /* fall through */ in jenkins_hashlittle2()
540 case 5 : b+=k8[4]; /* fall through */ in jenkins_hashlittle2()
545 case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */ in jenkins_hashlittle2()
559 b += k[2] + (((uint32_t)k[3])<<16); in jenkins_hashlittle2()
561 mix(a,b,c); in jenkins_hashlittle2()
571 b+=k[2]+(((uint32_t)k[3])<<16); in jenkins_hashlittle2()
576 b+=k[2]+(((uint32_t)k[3])<<16); in jenkins_hashlittle2()
580 case 8 : b+=k[2]+(((uint32_t)k[3])<<16); in jenkins_hashlittle2()
583 case 7 : b+=((uint32_t)k8[6])<<16; /* fall through */ in jenkins_hashlittle2()
584 case 6 : b+=k[2]; in jenkins_hashlittle2()
587 case 5 : b+=k8[4]; /* fall through */ in jenkins_hashlittle2()
595 case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */ in jenkins_hashlittle2()
608 b += k[4]; in jenkins_hashlittle2()
609 b += ((uint32_t)k[5])<<8; in jenkins_hashlittle2()
610 b += ((uint32_t)k[6])<<16; in jenkins_hashlittle2()
611 b += ((uint32_t)k[7])<<24; in jenkins_hashlittle2()
616 mix(a,b,c); in jenkins_hashlittle2()
628 case 8 : b+=((uint32_t)k[7])<<24; in jenkins_hashlittle2()
629 case 7 : b+=((uint32_t)k[6])<<16; in jenkins_hashlittle2()
630 case 6 : b+=((uint32_t)k[5])<<8; in jenkins_hashlittle2()
631 case 5 : b+=k[4]; in jenkins_hashlittle2()
637 case 0 : *pc=c; *pb=b; return; /* zero length strings require no mixing */ in jenkins_hashlittle2()
641 final(a,b,c); in jenkins_hashlittle2()
642 *pc=c; *pb=b; in jenkins_hashlittle2()
653 uint32_t a,b,c; in jenkins_hashbig() local
657 a = b = c = 0xdeadbeef + ((uint32_t)length) + initval; in jenkins_hashbig()
667 b += k[1]; in jenkins_hashbig()
669 mix(a,b,c); in jenkins_hashbig()
688 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in jenkins_hashbig()
689 case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break; in jenkins_hashbig()
690 case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break; in jenkins_hashbig()
691 case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break; in jenkins_hashbig()
692 case 8 : b+=k[1]; a+=k[0]; break; in jenkins_hashbig()
693 case 7 : b+=k[1]&0xffffff00; a+=k[0]; break; in jenkins_hashbig()
694 case 6 : b+=k[1]&0xffff0000; a+=k[0]; break; in jenkins_hashbig()
695 case 5 : b+=k[1]&0xff000000; a+=k[0]; break; in jenkins_hashbig()
709 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in jenkins_hashbig()
713 case 8 : b+=k[1]; a+=k[0]; break; in jenkins_hashbig()
714 case 7 : b+=((uint32_t)k8[6])<<8; /* fall through */ in jenkins_hashbig()
715 case 6 : b+=((uint32_t)k8[5])<<16; /* fall through */ in jenkins_hashbig()
716 case 5 : b+=((uint32_t)k8[4])<<24; /* fall through */ in jenkins_hashbig()
737 b += ((uint32_t)k[4])<<24; in jenkins_hashbig()
738 b += ((uint32_t)k[5])<<16; in jenkins_hashbig()
739 b += ((uint32_t)k[6])<<8; in jenkins_hashbig()
740 b += ((uint32_t)k[7]); in jenkins_hashbig()
745 mix(a,b,c); in jenkins_hashbig()
757 case 8 : b+=k[7]; in jenkins_hashbig()
758 case 7 : b+=((uint32_t)k[6])<<8; in jenkins_hashbig()
759 case 6 : b+=((uint32_t)k[5])<<16; in jenkins_hashbig()
760 case 5 : b+=((uint32_t)k[4])<<24; in jenkins_hashbig()
770 final(a,b,c); in jenkins_hashbig()
801 uint8_t qa[MAXLEN+1], qb[MAXLEN+2], *a = &qa[0], *b = &qb[1]; in driver2() local
825 for (l=0; l<hlen+1; ++l) {a[l] = b[l] = (uint8_t)0;} in driver2()
830 b[i] ^= ((k+1)<<j); in driver2()
831 b[i] ^= ((k+1)>>(8-j)); in driver2()
832 d[0] = hashlittle(b, hlen, m); in driver2()
871 uint8_t buf[MAXLEN+20], *b; in driver3() local
937 for (h=0, b=buf+1; h<8; ++h, ++b) in driver3()
942 for (j=0; j<i; ++j) *(b+j)=0; in driver3()
945 ref = hashlittle(b, len, (uint32_t)1); in driver3()
946 *(b+i)=(uint8_t)~0; in driver3()
947 *(b-1)=(uint8_t)~0; in driver3()
948 x = hashlittle(b, len, (uint32_t)1); in driver3()
949 y = hashlittle(b, len, (uint32_t)1); in driver3()
977 uint32_t b,c; in driver5() local
978 b=0, c=0, hashlittle2("", 0, &c, &b); in driver5()
979 printf("hash is %.8lx %.8lx\n", c, b); /* deadbeef deadbeef */ in driver5()
980 b=0xdeadbeef, c=0, hashlittle2("", 0, &c, &b); in driver5()
981 printf("hash is %.8lx %.8lx\n", c, b); /* bd5b7dde deadbeef */ in driver5()
982 b=0xdeadbeef, c=0xdeadbeef, hashlittle2("", 0, &c, &b); in driver5()
983 printf("hash is %.8lx %.8lx\n", c, b); /* 9c093ccd bd5b7dde */ in driver5()
984 b=0, c=0, hashlittle2("Four score and seven years ago", 30, &c, &b); in driver5()
985 printf("hash is %.8lx %.8lx\n", c, b); /* 17770551 ce7226e6 */ in driver5()
986 b=1, c=0, hashlittle2("Four score and seven years ago", 30, &c, &b); in driver5()
987 printf("hash is %.8lx %.8lx\n", c, b); /* e3607cae bd371de4 */ in driver5()
988 b=0, c=1, hashlittle2("Four score and seven years ago", 30, &c, &b); in driver5()
989 printf("hash is %.8lx %.8lx\n", c, b); /* cd628161 6cbea4b3 */ in driver5()