diff lib/gc-libgcrypt.c @ 6363:bae11f33bf3c

Split parts of the gc module into gc-md5 and gc-hmac-md5 modules.
author Simon Josefsson <simon@josefsson.org>
date Wed, 12 Oct 2005 01:09:32 +0000 (2005-10-12)
parents 2bcfc491052b
children d3733bac8f2d
line wrap: on
line diff
--- a/lib/gc-libgcrypt.c
+++ b/lib/gc-libgcrypt.c
@@ -103,9 +103,11 @@
 
   switch (hash)
     {
+#ifdef GC_USE_MD5
     case GC_MD5:
       gcryalg = GCRY_MD_MD5;
       break;
+#endif
 
     default:
       return GC_INVALID_HASH;
@@ -118,6 +120,7 @@
 
 /* One-call interface. */
 
+#ifdef GC_USE_MD5
 int
 gc_md5 (const void *in, size_t inlen, void *resbuf)
 {
@@ -147,7 +150,9 @@
 
   return GC_OK;
 }
+#endif
 
+#ifdef GC_USE_HMAC_MD5
 int
 gc_hmac_md5 (const void *key, size_t keylen,
 	     const void *in, size_t inlen, char *resbuf)
@@ -185,3 +190,4 @@
 
   return GC_OK;
 }
+#endif