Lines Matching defs:hd
197 MD4_CONTEXT *hd = context;
199 if( hd->count == 64 ) /* flush the buffer */
201 transform( hd, hd->buf );
203 hd->count = 0;
204 hd->nblocks++;
209 if( hd->count )
211 for( ; inlen && hd->count < 64; inlen-- )
212 hd->buf[hd->count++] = *inbuf++;
213 md4_write( hd, NULL, 0 );
221 transform( hd, inbuf );
222 hd->count = 0;
223 hd->nblocks++;
227 for( ; inlen && hd->count < 64; inlen-- )
228 hd->buf[hd->count++] = *inbuf++;
242 MD4_CONTEXT *hd = context;
246 md4_write(hd, NULL, 0); /* flush */;
248 t = hd->nblocks;
254 if( (lsb += hd->count) < t )
262 if( hd->count < 56 ) /* enough room */
264 hd->buf[hd->count++] = 0x80; /* pad */
265 while( hd->count < 56 )
266 hd->buf[hd->count++] = 0; /* pad */
270 hd->buf[hd->count++] = 0x80; /* pad character */
271 while( hd->count < 64 )
272 hd->buf[hd->count++] = 0;
273 md4_write(hd, NULL, 0); /* flush */;
274 memset(hd->buf, 0, 56 ); /* fill next block with zeroes */
277 hd->buf[56] = lsb ;
278 hd->buf[57] = lsb >> 8;
279 hd->buf[58] = lsb >> 16;
280 hd->buf[59] = lsb >> 24;
281 hd->buf[60] = msb ;
282 hd->buf[61] = msb >> 8;
283 hd->buf[62] = msb >> 16;
284 hd->buf[63] = msb >> 24;
285 transform( hd, hd->buf );
288 p = hd->buf;
290 #define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \
291 *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0)
293 #define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0)
306 MD4_CONTEXT *hd = context;
307 return hd->buf;