aboutsummaryrefslogtreecommitdiff
path: root/src/common/util.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-08-24 12:51:33 -0400
committerNick Mathewson <nickm@torproject.org>2009-10-15 15:17:13 -0400
commite1ddee8bbe724e934fe9a4cb2d290719a7d6105c (patch)
tree82848930764ba4b86637f15a25b557fc6805f31a /src/common/util.c
parenta8e92ba8fd65e12dbec265ccfcf0c89ac61847f2 (diff)
downloadtor-e1ddee8bbe724e934fe9a4cb2d290719a7d6105c.tar.gz
tor-e1ddee8bbe724e934fe9a4cb2d290719a7d6105c.zip
Code to generate, store, and parse microdescriptors and consensuses.
The consensus documents are not signed properly, not served, and not exchanged yet.
Diffstat (limited to 'src/common/util.c')
-rw-r--r--src/common/util.c7
1 files changed, 7 insertions, 0 deletions
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() \