mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Released snapshot 1.0.4g
This commit is contained in:
parent
dc0a8ead18
commit
7cf01ff10d
31 changed files with 2049 additions and 1601 deletions
|
@ -141,6 +141,18 @@
|
|||
* 1 million times "a" 52783243c1697bdbe16d37f97f68f08325dc1528
|
||||
*/
|
||||
|
||||
static void
|
||||
burn_stack (int bytes)
|
||||
{
|
||||
char buf[150];
|
||||
|
||||
memset (buf, 0, sizeof buf);
|
||||
bytes -= sizeof buf;
|
||||
if (bytes > 0)
|
||||
burn_stack (bytes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
rmd160_init( RMD160_CONTEXT *hd )
|
||||
|
@ -405,6 +417,7 @@ rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen)
|
|||
{
|
||||
if( hd->count == 64 ) { /* flush the buffer */
|
||||
transform( hd, hd->buf );
|
||||
burn_stack (108+5*sizeof(void*));
|
||||
hd->count = 0;
|
||||
hd->nblocks++;
|
||||
}
|
||||
|
@ -425,6 +438,7 @@ rmd160_write( RMD160_CONTEXT *hd, byte *inbuf, size_t inlen)
|
|||
inlen -= 64;
|
||||
inbuf += 64;
|
||||
}
|
||||
burn_stack (108+5*sizeof(void*));
|
||||
for( ; inlen && hd->count < 64; inlen-- )
|
||||
hd->buf[hd->count++] = *inbuf++;
|
||||
}
|
||||
|
@ -497,6 +511,7 @@ rmd160_final( RMD160_CONTEXT *hd )
|
|||
hd->buf[62] = msb >> 16;
|
||||
hd->buf[63] = msb >> 24;
|
||||
transform( hd, hd->buf );
|
||||
burn_stack (108+5*sizeof(void*));
|
||||
|
||||
p = hd->buf;
|
||||
#ifdef BIG_ENDIAN_HOST
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue