diff options
author | Werner Koch <[email protected]> | 1998-03-19 15:27:29 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-03-19 15:27:29 +0000 |
commit | 6b91e7762c65097a103b2b17db304a4d85b3573d (patch) | |
tree | 4303dbf887db8130c58e1025cac3c8fe291c6ceb /cipher/md.c | |
parent | NEw test keyrings (diff) | |
download | gnupg-6b91e7762c65097a103b2b17db304a4d85b3573d.tar.gz gnupg-6b91e7762c65097a103b2b17db304a4d85b3573d.zip |
some cleanups
Diffstat (limited to '')
-rw-r--r-- | cipher/md.c | 15 |
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 ) |