summaryrefslogtreecommitdiff
path: root/cipher/md5.c
diff options
context:
space:
mode:
Diffstat (limited to 'cipher/md5.c')
-rw-r--r--cipher/md5.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/cipher/md5.c b/cipher/md5.c
index f03a301d..9d2f7c88 100644
--- a/cipher/md5.c
+++ b/cipher/md5.c
@@ -1,5 +1,5 @@
/* md5.c - MD5 Message-Digest Algorithm
- * Copyright (C) 1995,1996,1998,1999,2001,2002 Free Software Foundation, Inc.
+ * Copyright (C) 1995,1996,1998,1999,2001,2002,2003 Free Software Foundation, Inc.
*
* This file is part of Libgcrypt.
*
@@ -62,18 +62,6 @@ md5_init( MD5_CONTEXT *ctx )
ctx->count = 0;
}
-static void
-burn_stack (int bytes)
-{
- char buf[128];
-
- memset (buf, 0, sizeof buf);
- bytes -= sizeof buf;
- if (bytes > 0)
- burn_stack (bytes);
-}
-
-
/* These are the four functions used in the four steps of the MD5 algorithm
and defined in the RFC 1321. The first function is a little bit optimized
@@ -229,7 +217,7 @@ md5_write( MD5_CONTEXT *hd, byte *inbuf, size_t inlen)
{
if( hd->count == 64 ) { /* flush the buffer */
transform( hd, hd->buf );
- burn_stack (80+6*sizeof(void*));
+ _gcry_burn_stack (80+6*sizeof(void*));
hd->count = 0;
hd->nblocks++;
}
@@ -242,7 +230,7 @@ md5_write( MD5_CONTEXT *hd, byte *inbuf, size_t inlen)
if( !inlen )
return;
}
- burn_stack (80+6*sizeof(void*));
+ _gcry_burn_stack (80+6*sizeof(void*));
while( inlen >= 64 ) {
transform( hd, inbuf );
@@ -308,7 +296,7 @@ md5_final( MD5_CONTEXT *hd )
hd->buf[62] = msb >> 16;
hd->buf[63] = msb >> 24;
transform( hd, hd->buf );
- burn_stack (80+6*sizeof(void*));
+ _gcry_burn_stack (80+6*sizeof(void*));
p = hd->buf;
#ifdef BIG_ENDIAN_HOST