From e1ddee8bbe724e934fe9a4cb2d290719a7d6105c Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 24 Aug 2009 12:51:33 -0400 Subject: Code to generate, store, and parse microdescriptors and consensuses. The consensus documents are not signed properly, not served, and not exchanged yet. --- src/common/util.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/common/util.c') diff --git a/src/common/util.c b/src/common/util.c index d05c308fe8..139c1aaad8 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -684,6 +684,13 @@ tor_digest_is_zero(const char *digest) return tor_mem_is_zero(digest, DIGEST_LEN); } +/** Return true iff the DIGEST256_LEN bytes in digest are all zero. */ +int +tor_digest256_is_zero(const char *digest) +{ + return tor_mem_is_zero(digest, DIGEST256_LEN); +} + /* Helper: common code to check whether the result of a strtol or strtoul or * strtoll is correct. */ #define CHECK_STRTOX_RESULT() \ -- cgit v1.2.3-54-g00ecf