summaryrefslogtreecommitdiff
path: root/lib/gc.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2005-10-12 01:42:54 +0000
committerSimon Josefsson <simon@josefsson.org>2005-10-12 01:42:54 +0000
commitea3ee2b5133fd11042c0cdf0e71100e94a03acf0 (patch)
tree2ffd9f808ef06e515fdd78a103054e69e4a239fb /lib/gc.h
parent9a2b952ab7a836a546997e60497d471c326bc6b7 (diff)
downloadgnulib-ea3ee2b5133fd11042c0cdf0e71100e94a03acf0.tar.gz
Add gc-sha1 module.
Diffstat (limited to 'lib/gc.h')
-rw-r--r--lib/gc.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/gc.h b/lib/gc.h
index c966a99b29..c66d31a6b2 100644
--- a/lib/gc.h
+++ b/lib/gc.h
@@ -41,11 +41,13 @@ typedef enum Gc_rc Gc_rc;
/* Hash types. */
enum Gc_hash
{
- GC_MD5
+ GC_MD5,
+ GC_SHA1
};
typedef enum Gc_hash Gc_hash;
#define GC_MD5_DIGEST_SIZE 16
+#define GC_SHA1_DIGEST_SIZE 20
/* Call before respectively after any other functions. */
extern int gc_init (void);
@@ -75,9 +77,13 @@ gc_hash_buffer (Gc_hash hash, const void *in, size_t inlen, char *out);
/* One-call interface. */
extern int gc_md5 (const void *in, size_t inlen, void *resbuf);
+extern int gc_sha1 (const void *in, size_t inlen, void *resbuf);
extern int gc_hmac_md5 (const void *key, size_t keylen,
const void *in, size_t inlen,
char *resbuf);
+extern int gc_hmac_sha1 (const void *key, size_t keylen,
+ const void *in, size_t inlen,
+ char *resbuf);
/*
TODO: