Lines Matching defs:hd
222 MD5_CONTEXT *hd = context;
224 if( hd->count == 64 ) /* flush the buffer */
226 transform( hd, hd->buf );
228 hd->count = 0;
229 hd->nblocks++;
234 if( hd->count )
236 for( ; inlen && hd->count < 64; inlen-- )
237 hd->buf[hd->count++] = *inbuf++;
238 md5_write( hd, NULL, 0 );
246 transform( hd, inbuf );
247 hd->count = 0;
248 hd->nblocks++;
252 for( ; inlen && hd->count < 64; inlen-- )
253 hd->buf[hd->count++] = *inbuf++;
268 MD5_CONTEXT *hd = context;
272 md5_write(hd, NULL, 0); /* flush */;
274 t = hd->nblocks;
280 if( (lsb += hd->count) < t )
288 if( hd->count < 56 ) /* enough room */
290 hd->buf[hd->count++] = 0x80; /* pad */
291 while( hd->count < 56 )
292 hd->buf[hd->count++] = 0; /* pad */
296 hd->buf[hd->count++] = 0x80; /* pad character */
297 while( hd->count < 64 )
298 hd->buf[hd->count++] = 0;
299 md5_write(hd, NULL, 0); /* flush */;
300 memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
303 hd->buf[56] = lsb ;
304 hd->buf[57] = lsb >> 8;
305 hd->buf[58] = lsb >> 16;
306 hd->buf[59] = lsb >> 24;
307 hd->buf[60] = msb ;
308 hd->buf[61] = msb >> 8;
309 hd->buf[62] = msb >> 16;
310 hd->buf[63] = msb >> 24;
311 transform( hd, hd->buf );
314 p = hd->buf;
316 #define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \
317 *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0)
319 #define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0)
332 MD5_CONTEXT *hd = (MD5_CONTEXT *) context;
333 return hd->buf;