aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/md.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>1998-03-19 15:27:29 +0000
committerWerner Koch <[email protected]>1998-03-19 15:27:29 +0000
commit6b91e7762c65097a103b2b17db304a4d85b3573d (patch)
tree4303dbf887db8130c58e1025cac3c8fe291c6ceb /cipher/md.c
parentNEw test keyrings (diff)
downloadgnupg-6b91e7762c65097a103b2b17db304a4d85b3573d.tar.gz
gnupg-6b91e7762c65097a103b2b17db304a4d85b3573d.zip
some cleanups
Diffstat (limited to '')
-rw-r--r--cipher/md.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/cipher/md.c b/cipher/md.c
index b19399653..0f49443b7 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -170,6 +170,21 @@ md_get_algo( MD_HANDLE a )
return 0;
}
+/****************
+ * Return the length of the digest
+ */
+int
+md_digest_length( int algo )
+{
+ switch( algo ) {
+ case DIGEST_ALGO_RMD160:
+ case DIGEST_ALGO_SHA1:
+ return 20;
+ default:
+ return 16;
+ }
+}
+
const byte *
md_asn_oid( int algo, size_t *asnlen, size_t *mdlen )