302{
303 static unsigned char padding[64] = {
304 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
305 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
306 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
307 };
308
309 if (!finalized) {
310
311 unsigned char bits[8];
312 encode(bits, count, 8);
313
314
316 size_type padLen = (index < 56) ? (56 - index) : (120 - index);
318
319
321
322
323 encode(digest, state, 16);
324
325
326 memset(buffer, 0, sizeof buffer);
327 memset(count, 0, sizeof count);
328
329 finalized=true;
330 }
331
332 return *this;
333}