Lines Matching refs:a
115 #define mix(a,b,c) \ argument
117 a -= c; a ^= rot(c, 4); c += b; \
118 b -= a; b ^= rot(a, 6); a += c; \
119 c -= b; c ^= rot(b, 8); b += a; \
120 a -= c; a ^= rot(c,16); c += b; \
121 b -= a; b ^= rot(a,19); a += c; \
122 c -= b; c ^= rot(b, 4); b += a; \
150 #define final(a,b,c) \ argument
153 a ^= c; a -= rot(c,11); \
154 b ^= a; b -= rot(a,25); \
156 a ^= c; a -= rot(c,4); \
157 b ^= a; b -= rot(a,14); \
179 uint32_t a,b,c; in hashword() local
182 a = b = c = 0xdeadbeef + (((uint32_t)length)<<2) + initval; in hashword()
187 a += k[0]; in hashword()
190 mix(a,b,c); in hashword()
200 case 1 : a+=k[0]; in hashword()
201 final(a,b,c); in hashword()
224 uint32_t a,b,c; in hashword2() local
227 a = b = c = 0xdeadbeef + ((uint32_t)(length<<2)) + *pc; in hashword2()
233 a += k[0]; in hashword2()
236 mix(a,b,c); in hashword2()
246 case 1 : a+=k[0]; in hashword2()
247 final(a,b,c); in hashword2()
285 uint32_t a,b,c; /* internal state */ in hashlittle() local
289 a = b = c = 0xdeadbeef + ((uint32_t)length) + initval; in hashlittle()
299 a += k[0]; in hashlittle()
302 mix(a,b,c); in hashlittle()
321 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashlittle()
322 case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break; in hashlittle()
323 case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break; in hashlittle()
324 case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break; in hashlittle()
325 case 8 : b+=k[1]; a+=k[0]; break; in hashlittle()
326 case 7 : b+=k[1]&0xffffff; a+=k[0]; break; in hashlittle()
327 case 6 : b+=k[1]&0xffff; a+=k[0]; break; in hashlittle()
328 case 5 : b+=k[1]&0xff; a+=k[0]; break; in hashlittle()
329 case 4 : a+=k[0]; break; in hashlittle()
330 case 3 : a+=k[0]&0xffffff; break; in hashlittle()
331 case 2 : a+=k[0]&0xffff; break; in hashlittle()
332 case 1 : a+=k[0]&0xff; break; in hashlittle()
341 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashlittle()
345 case 8 : b+=k[1]; a+=k[0]; break; in hashlittle()
349 case 4 : a+=k[0]; break; in hashlittle()
350 case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */ in hashlittle()
351 case 2 : a+=((uint32_t)k8[1])<<8; /* fall through */ in hashlittle()
352 case 1 : a+=k8[0]; break; in hashlittle()
365 a += k[0] + (((uint32_t)k[1])<<16); in hashlittle()
368 mix(a,b,c); in hashlittle()
379 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
384 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
388 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
392 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
395 case 4 : a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle()
397 case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */ in hashlittle()
398 case 2 : a+=k[0]; in hashlittle()
400 case 1 : a+=k8[0]; in hashlittle()
411 a += k[0]; in hashlittle()
412 a += ((uint32_t)k[1])<<8; in hashlittle()
413 a += ((uint32_t)k[2])<<16; in hashlittle()
414 a += ((uint32_t)k[3])<<24; in hashlittle()
423 mix(a,b,c); in hashlittle()
439 case 4 : a+=((uint32_t)k[3])<<24; in hashlittle()
440 case 3 : a+=((uint32_t)k[2])<<16; in hashlittle()
441 case 2 : a+=((uint32_t)k[1])<<8; in hashlittle()
442 case 1 : a+=k[0]; in hashlittle()
448 final(a,b,c); in hashlittle()
469 uint32_t a,b,c; /* internal state */ in hashlittle2() local
473 a = b = c = 0xdeadbeef + ((uint32_t)length) + *pc; in hashlittle2()
484 a += k[0]; in hashlittle2()
487 mix(a,b,c); in hashlittle2()
506 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashlittle2()
507 case 11: c+=k[2]&0xffffff; b+=k[1]; a+=k[0]; break; in hashlittle2()
508 case 10: c+=k[2]&0xffff; b+=k[1]; a+=k[0]; break; in hashlittle2()
509 case 9 : c+=k[2]&0xff; b+=k[1]; a+=k[0]; break; in hashlittle2()
510 case 8 : b+=k[1]; a+=k[0]; break; in hashlittle2()
511 case 7 : b+=k[1]&0xffffff; a+=k[0]; break; in hashlittle2()
512 case 6 : b+=k[1]&0xffff; a+=k[0]; break; in hashlittle2()
513 case 5 : b+=k[1]&0xff; a+=k[0]; break; in hashlittle2()
514 case 4 : a+=k[0]; break; in hashlittle2()
515 case 3 : a+=k[0]&0xffffff; break; in hashlittle2()
516 case 2 : a+=k[0]&0xffff; break; in hashlittle2()
517 case 1 : a+=k[0]&0xff; break; in hashlittle2()
526 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashlittle2()
530 case 8 : b+=k[1]; a+=k[0]; break; in hashlittle2()
534 case 4 : a+=k[0]; break; in hashlittle2()
535 case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */ in hashlittle2()
536 case 2 : a+=((uint32_t)k8[1])<<8; /* fall through */ in hashlittle2()
537 case 1 : a+=k8[0]; break; in hashlittle2()
550 a += k[0] + (((uint32_t)k[1])<<16); in hashlittle2()
553 mix(a,b,c); in hashlittle2()
564 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
569 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
573 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
577 a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
580 case 4 : a+=k[0]+(((uint32_t)k[1])<<16); in hashlittle2()
582 case 3 : a+=((uint32_t)k8[2])<<16; /* fall through */ in hashlittle2()
583 case 2 : a+=k[0]; in hashlittle2()
585 case 1 : a+=k8[0]; in hashlittle2()
596 a += k[0]; in hashlittle2()
597 a += ((uint32_t)k[1])<<8; in hashlittle2()
598 a += ((uint32_t)k[2])<<16; in hashlittle2()
599 a += ((uint32_t)k[3])<<24; in hashlittle2()
608 mix(a,b,c); in hashlittle2()
624 case 4 : a+=((uint32_t)k[3])<<24; in hashlittle2()
625 case 3 : a+=((uint32_t)k[2])<<16; in hashlittle2()
626 case 2 : a+=((uint32_t)k[1])<<8; in hashlittle2()
627 case 1 : a+=k[0]; in hashlittle2()
633 final(a,b,c); in hashlittle2()
647 uint32_t a,b,c; in hashbig() local
651 a = b = c = 0xdeadbeef + ((uint32_t)length) + initval; in hashbig()
661 a += k[0]; in hashbig()
664 mix(a,b,c); in hashbig()
683 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashbig()
684 case 11: c+=k[2]&0xffffff00; b+=k[1]; a+=k[0]; break; in hashbig()
685 case 10: c+=k[2]&0xffff0000; b+=k[1]; a+=k[0]; break; in hashbig()
686 case 9 : c+=k[2]&0xff000000; b+=k[1]; a+=k[0]; break; in hashbig()
687 case 8 : b+=k[1]; a+=k[0]; break; in hashbig()
688 case 7 : b+=k[1]&0xffffff00; a+=k[0]; break; in hashbig()
689 case 6 : b+=k[1]&0xffff0000; a+=k[0]; break; in hashbig()
690 case 5 : b+=k[1]&0xff000000; a+=k[0]; break; in hashbig()
691 case 4 : a+=k[0]; break; in hashbig()
692 case 3 : a+=k[0]&0xffffff00; break; in hashbig()
693 case 2 : a+=k[0]&0xffff0000; break; in hashbig()
694 case 1 : a+=k[0]&0xff000000; break; in hashbig()
703 case 12: c+=k[2]; b+=k[1]; a+=k[0]; break; in hashbig()
707 case 8 : b+=k[1]; a+=k[0]; break; in hashbig()
711 case 4 : a+=k[0]; break; in hashbig()
712 case 3 : a+=((uint32_t)k8[2])<<8; /* fall through */ in hashbig()
713 case 2 : a+=((uint32_t)k8[1])<<16; /* fall through */ in hashbig()
714 case 1 : a+=((uint32_t)k8[0])<<24; break; in hashbig()
726 a += ((uint32_t)k[0])<<24; in hashbig()
727 a += ((uint32_t)k[1])<<16; in hashbig()
728 a += ((uint32_t)k[2])<<8; in hashbig()
729 a += ((uint32_t)k[3]); in hashbig()
738 mix(a,b,c); in hashbig()
754 case 4 : a+=k[3]; in hashbig()
755 case 3 : a+=((uint32_t)k[2])<<8; in hashbig()
756 case 2 : a+=((uint32_t)k[1])<<16; in hashbig()
757 case 1 : a+=((uint32_t)k[0])<<24; in hashbig()
763 final(a,b,c); in hashbig()
776 time_t a,z; in driver1() local
778 time(&a); in driver1()
785 if (z-a > 0) printf("time %d %.8x\n", z-a, h); in driver1()
795 uint8_t qa[MAXLEN+1], qb[MAXLEN+2], *a = &qa[0], *b = &qb[1]; in driver2() local
819 for (l=0; l<hlen+1; ++l) {a[l] = b[l] = (uint8_t)0;} in driver2()
821 a[i] ^= (k<<j); in driver2()
822 a[i] ^= (k>>(8-j)); in driver2()
823 c[0] = hashlittle(a, hlen, m); in driver2()