1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-14 21:47:19 +02:00

Released snapshot 1.0.4g

This commit is contained in:
Werner Koch 2001-04-06 09:59:50 +00:00
parent dc0a8ead18
commit 7cf01ff10d
31 changed files with 2049 additions and 1601 deletions

View file

@ -630,6 +630,19 @@ print_data( const char *text, u64 a, u64 b, u64 c,
}
static void
burn_stack (int bytes)
{
char buf[256];
memset (buf, 0, sizeof buf);
bytes -= sizeof buf;
if (bytes > 0)
burn_stack (bytes);
}
static void
tiger_init( TIGER_CONTEXT *hd )
{
@ -768,6 +781,7 @@ tiger_write( TIGER_CONTEXT *hd, byte *inbuf, size_t inlen)
{
if( hd->count == 64 ) { /* flush the buffer */
transform( hd, hd->buf );
burn_stack (21*8+11*sizeof(void*));
hd->count = 0;
hd->nblocks++;
}
@ -788,6 +802,7 @@ tiger_write( TIGER_CONTEXT *hd, byte *inbuf, size_t inlen)
inlen -= 64;
inbuf += 64;
}
burn_stack (21*8+11*sizeof(void*));
for( ; inlen && hd->count < 64; inlen-- )
hd->buf[hd->count++] = *inbuf++;
}
@ -841,6 +856,7 @@ tiger_final( TIGER_CONTEXT *hd )
hd->buf[62] = msb >> 16;
hd->buf[63] = msb >> 24;
transform( hd, hd->buf );
burn_stack (21*8+11*sizeof(void*));
p = hd->buf;
#ifdef BIG_ENDIAN_HOST