aboutsummaryrefslogtreecommitdiffstats
path: root/cipher/md.c
diff options
context:
space:
mode:
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 )