summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-23 10:58:27 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-23 10:58:27 -0400
commitb53a2059c4495946d1bb27f8be1f6fadb7af69f1 (patch)
treeea7ecc5c2520cc35517cd930cda2cf5e5f0316d1 /src/common
parent2a884926c04959b11c39e656099f19a55c3a8e95 (diff)
downloadtor-b53a2059c4495946d1bb27f8be1f6fadb7af69f1.tar.gz
tor-b53a2059c4495946d1bb27f8be1f6fadb7af69f1.zip
Expose crypto_digest_algorithm_get_length from crypto.c
Also, use it in routerparse.c
Diffstat (limited to 'src/common')
-rw-r--r--src/common/crypto.c2
-rw-r--r--src/common/crypto.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/common/crypto.c b/src/common/crypto.c
index fb5dd06b5e..4ed8bfa7e6 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1727,7 +1727,7 @@ crypto_digest_algorithm_parse_name(const char *name)
}
/** Given an algorithm, return the digest length in bytes. */
-static inline size_t
+size_t
crypto_digest_algorithm_get_length(digest_algorithm_t alg)
{
switch (alg) {
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 017c849097..ff38cca0da 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -233,6 +233,7 @@ void crypto_digest_smartlist(char *digest_out, size_t len_out,
const struct smartlist_t *lst, const char *append,
digest_algorithm_t alg);
const char *crypto_digest_algorithm_get_name(digest_algorithm_t alg);
+size_t crypto_digest_algorithm_get_length(digest_algorithm_t alg);
int crypto_digest_algorithm_parse_name(const char *name);
crypto_digest_t *crypto_digest_new(void);
crypto_digest_t *crypto_digest256_new(digest_algorithm_t algorithm);