summaryrefslogtreecommitdiff
path: root/lib/gc-libgcrypt.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2005-10-12 01:09:32 +0000
committerSimon Josefsson <simon@josefsson.org>2005-10-12 01:09:32 +0000
commitbb504c0f66100dc2664823655e2e19fbd37199f9 (patch)
tree6fc9a7bd741c59c66e3e2b0e37f3d52adcbd64e2 /lib/gc-libgcrypt.c
parenta5f08cf2fb4b3b6c217277e33fe05c547d11afde (diff)
downloadgnulib-bb504c0f66100dc2664823655e2e19fbd37199f9.tar.gz
Split parts of the gc module into gc-md5 and gc-hmac-md5 modules.
Diffstat (limited to 'lib/gc-libgcrypt.c')
-rw-r--r--lib/gc-libgcrypt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gc-libgcrypt.c b/lib/gc-libgcrypt.c
index d821c1d49e..0c7e2c34fd 100644
--- a/lib/gc-libgcrypt.c
+++ b/lib/gc-libgcrypt.c
@@ -103,9 +103,11 @@ gc_hash_buffer (Gc_hash hash, const void *in, size_t inlen, char *resbuf)
switch (hash)
{
+#ifdef GC_USE_MD5
case GC_MD5:
gcryalg = GCRY_MD_MD5;
break;
+#endif
default:
return GC_INVALID_HASH;
@@ -118,6 +120,7 @@ gc_hash_buffer (Gc_hash hash, const void *in, size_t inlen, char *resbuf)
/* One-call interface. */
+#ifdef GC_USE_MD5
int
gc_md5 (const void *in, size_t inlen, void *resbuf)
{
@@ -147,7 +150,9 @@ gc_md5 (const void *in, size_t inlen, void *resbuf)
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 @@ gc_hmac_md5 (const void *key, size_t keylen,
return GC_OK;
}
+#endif