• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/libgcrypt-1.5.0/cipher/

Lines Matching defs:hd

146   RMD160_CONTEXT *hd = context;
148 hd->h0 = 0x67452301;
149 hd->h1 = 0xEFCDAB89;
150 hd->h2 = 0x98BADCFE;
151 hd->h3 = 0x10325476;
152 hd->h4 = 0xC3D2E1F0;
153 hd->nblocks = 0;
154 hd->count = 0;
163 transform ( RMD160_CONTEXT *hd, const unsigned char *data )
214 a = hd->h0;
215 b = hd->h1;
216 c = hd->h2;
217 d = hd->h3;
218 e = hd->h4;
303 a = hd->h0;
304 b = hd->h1;
305 c = hd->h2;
306 d = hd->h3;
307 e = hd->h4;
390 t = hd->h1 + d + cc;
391 hd->h1 = hd->h2 + e + dd;
392 hd->h2 = hd->h3 + a + ee;
393 hd->h3 = hd->h4 + b + aa;
394 hd->h4 = hd->h0 + c + bb;
395 hd->h0 = t;
406 RMD160_CONTEXT *hd = context;
408 if( hd->count == 64 ) /* flush the buffer */
410 transform( hd, hd->buf );
412 hd->count = 0;
413 hd->nblocks++;
417 if( hd->count )
419 for( ; inlen && hd->count < 64; inlen-- )
420 hd->buf[hd->count++] = *inbuf++;
421 rmd160_write( hd, NULL, 0 );
428 transform( hd, inbuf );
429 hd->count = 0;
430 hd->nblocks++;
435 for( ; inlen && hd->count < 64; inlen-- )
436 hd->buf[hd->count++] = *inbuf++;
446 _gcry_rmd160_mixblock ( RMD160_CONTEXT *hd, void *blockof64byte )
450 transform ( hd, blockof64byte );
451 #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
467 RMD160_CONTEXT *hd = context;
471 rmd160_write(hd, NULL, 0); /* flush */;
473 t = hd->nblocks;
479 if( (lsb += hd->count) < t )
487 if( hd->count < 56 ) /* enough room */
489 hd->buf[hd->count++] = 0x80; /* pad */
490 while( hd->count < 56 )
491 hd->buf[hd->count++] = 0; /* pad */
495 hd->buf[hd->count++] = 0x80; /* pad character */
496 while( hd->count < 64 )
497 hd->buf[hd->count++] = 0;
498 rmd160_write(hd, NULL, 0); /* flush */;
499 memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
502 hd->buf[56] = lsb ;
503 hd->buf[57] = lsb >> 8;
504 hd->buf[58] = lsb >> 16;
505 hd->buf[59] = lsb >> 24;
506 hd->buf[60] = msb ;
507 hd->buf[61] = msb >> 8;
508 hd->buf[62] = msb >> 16;
509 hd->buf[63] = msb >> 24;
510 transform( hd, hd->buf );
513 p = hd->buf;
515 #define X(a) do { *p++ = hd->h##a ; *p++ = hd->h##a >> 8; \
516 *p++ = hd->h##a >> 16; *p++ = hd->h##a >> 24; } while(0)
518 #define X(a) do { *(u32*)p = hd->h##a ; p += 4; } while(0)
531 RMD160_CONTEXT *hd = context;
533 return hd->buf;
545 RMD160_CONTEXT hd;
547 _gcry_rmd160_init ( &hd );
548 rmd160_write ( &hd, buffer, length );
549 rmd160_final ( &hd );
550 memcpy ( outbuf, hd.buf, 20 );